@Only-api
@Post
@Get
@Delete
@Procedure
Feature: Stem Cell Transplantation resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific Procedure node. This resource is part of the Stem Cell Transplantation.
File name: xas.feature
Relative path: api/xas.feature
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:49.933 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:50.534 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:50.534 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6KmuDT5KluLlYwam"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16214/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:30:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16214/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:30:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:50.534 [print] {
"resourceType": "Procedure",
"id": "16214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:30:55.143+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
> *
print COOKIES
11:30:50.534 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:50.536 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:50.536 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6KmuDT5KluLlYwam"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16214/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:30:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16214/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:30:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:50.536 [print] {
"resourceType": "Procedure",
"id": "16214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:30:55.143+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
> *
print COOKIES
11:30:50.536 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:51.120 [print] {
"resourceType": "Procedure",
"id": "16214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:30:55.143+02:00",
"source": "#6KmuDT5KluLlYwam",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:51.700 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:52.351 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:30:56.323+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:30:56.323+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:52.352 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:52.994 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:52.994 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dESFYvkWYnI2sNzq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16215/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:30:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16215/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:30:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:52.994 [print] {
"resourceType": "Procedure",
"id": "16215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:30:57.600+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
> *
print COOKIES
11:30:52.994 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:52.994 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:52.994 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dESFYvkWYnI2sNzq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16215/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:30:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16215/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:30:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:52.994 [print] {
"resourceType": "Procedure",
"id": "16215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:30:57.600+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
> *
print COOKIES
11:30:52.994 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:53.615 [print] {
"resourceType": "Procedure",
"id": "16215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:30:57.600+02:00",
"source": "#dESFYvkWYnI2sNzq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:54.245 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:54.866 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:30:58.865+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:30:58.865+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:54.868 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:55.465 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:55.465 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JGMqNSXErkUlYPFT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16216/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16216/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:55.465 [print] {
"resourceType": "Procedure",
"id": "16216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:00.088+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
> *
print COOKIES
11:30:55.465 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:55.465 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:55.465 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JGMqNSXErkUlYPFT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16216/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16216/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:55.465 [print] {
"resourceType": "Procedure",
"id": "16216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:00.088+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
> *
print COOKIES
11:30:55.465 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:56.055 [print] {
"resourceType": "Procedure",
"id": "16216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:00.088+02:00",
"source": "#JGMqNSXErkUlYPFT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:56.682 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:57.306 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:01.296+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:01.296+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:57.306 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:57.925 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:57.925 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uldlSQAhsvRSSz64"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16217/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16217/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:57.925 [print] {
"resourceType": "Procedure",
"id": "16217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:02.549+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
> *
print COOKIES
11:30:57.925 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:57.925 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:57.925 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uldlSQAhsvRSSz64"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16217/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16217/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:57.925 [print] {
"resourceType": "Procedure",
"id": "16217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:02.549+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
> *
print COOKIES
11:30:57.925 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:58.525 [print] {
"resourceType": "Procedure",
"id": "16217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:02.549+02:00",
"source": "#uldlSQAhsvRSSz64",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:59.125 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:59.747 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:03.757+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:03.757+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:59.747 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:00.331 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:00.331 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7dC1r9gY2MKU7I0k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16218/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16218/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:00.331 [print] {
"resourceType": "Procedure",
"id": "16218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:04.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
> *
print COOKIES
11:31:00.331 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:00.331 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:00.331 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7dC1r9gY2MKU7I0k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16218/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16218/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:00.331 [print] {
"resourceType": "Procedure",
"id": "16218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:04.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
> *
print COOKIES
11:31:00.331 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:00.968 [print] {
"resourceType": "Procedure",
"id": "16218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:04.970+02:00",
"source": "#7dC1r9gY2MKU7I0k",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:01.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:02.252 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:06.211+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:06.211+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:02.252 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:03.119 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:03.119 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yaAkQGKGRi6YqZ0K"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16219/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16219/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:03.119 [print] {
"resourceType": "Procedure",
"id": "16219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:07.739+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
> *
print COOKIES
11:31:03.119 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:03.121 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:03.121 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yaAkQGKGRi6YqZ0K"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16219/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16219/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:03.121 [print] {
"resourceType": "Procedure",
"id": "16219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:07.739+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
> *
print COOKIES
11:31:03.121 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:03.714 [print] {
"resourceType": "Procedure",
"id": "16219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:07.739+02:00",
"source": "#yaAkQGKGRi6YqZ0K",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:04.290 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:04.897 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:08.915+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:08.915+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:04.898 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:05.539 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:05.539 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zTAo3dM1AxSoacyP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16220/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16220/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:05.539 [print] {
"resourceType": "Procedure",
"id": "16220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:10.153+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
> *
print COOKIES
11:31:05.539 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:05.541 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:05.541 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zTAo3dM1AxSoacyP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16220/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16220/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:05.541 [print] {
"resourceType": "Procedure",
"id": "16220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:10.153+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
> *
print COOKIES
11:31:05.541 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:06.129 [print] {
"resourceType": "Procedure",
"id": "16220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:10.153+02:00",
"source": "#zTAo3dM1AxSoacyP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:07.796 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:08.427 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:12.382+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:12.382+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:08.428 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-09-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:09.050 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"556"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:09.050 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vGKrNmH5GySYaE25"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16221/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16221/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:09.050 [print] {
"resourceType": "Procedure",
"id": "16221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:13.663+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-09-02"
}
> *
print COOKIES
11:31:09.051 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:09.052 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"556"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:09.052 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vGKrNmH5GySYaE25"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16221/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16221/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:09.052 [print] {
"resourceType": "Procedure",
"id": "16221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:13.663+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-09-02"
}
> *
print COOKIES
11:31:09.052 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:09.675 [print] {
"resourceType": "Procedure",
"id": "16221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:13.663+02:00",
"source": "#vGKrNmH5GySYaE25",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-09-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:10.314 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:10.893 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:14.944+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:14.944+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:10.894 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:11.492 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:11.492 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j0wdrIQxo1BOrMrC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16222/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16222/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:11.492 [print] {
"resourceType": "Procedure",
"id": "16222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:16.113+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
> *
print COOKIES
11:31:11.492 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:11.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:11.494 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j0wdrIQxo1BOrMrC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16222/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16222/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:11.494 [print] {
"resourceType": "Procedure",
"id": "16222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:16.113+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
> *
print COOKIES
11:31:11.494 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:12.084 [print] {
"resourceType": "Procedure",
"id": "16222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:16.113+02:00",
"source": "#j0wdrIQxo1BOrMrC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:12.751 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:13.366 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:17.363+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:17.363+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:13.372 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:13.956 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:13.956 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"T1bLG2mdeYRiDd1j"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16223/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16223/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:13.956 [print] {
"resourceType": "Procedure",
"id": "16223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:18.577+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
> *
print COOKIES
11:31:13.956 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:13.966 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:13.966 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"T1bLG2mdeYRiDd1j"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16223/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16223/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:13.966 [print] {
"resourceType": "Procedure",
"id": "16223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:18.577+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
> *
print COOKIES
11:31:13.966 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:14.583 [print] {
"resourceType": "Procedure",
"id": "16223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:18.577+02:00",
"source": "#T1bLG2mdeYRiDd1j",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:15.158 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:15.791 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:19.788+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:19.788+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:15.791 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:16.401 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:16.401 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yUQ3lGvuSoQ8gAB0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16224/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16224/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:16.401 [print] {
"resourceType": "Procedure",
"id": "16224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:21.018+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
> *
print COOKIES
11:31:16.401 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:16.402 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:16.402 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yUQ3lGvuSoQ8gAB0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16224/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16224/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:16.402 [print] {
"resourceType": "Procedure",
"id": "16224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:21.018+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
> *
print COOKIES
11:31:16.402 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:16.973 [print] {
"resourceType": "Procedure",
"id": "16224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:21.018+02:00",
"source": "#yUQ3lGvuSoQ8gAB0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:17.827 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:18.405 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:22.248+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:22.248+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:18.406 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:19.030 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:19.030 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OT6uadTcT11FhBa1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16225/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16225/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:19.030 [print] {
"resourceType": "Procedure",
"id": "16225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:23.654+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
> *
print COOKIES
11:31:19.030 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:19.034 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:19.034 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OT6uadTcT11FhBa1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16225/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16225/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:19.034 [print] {
"resourceType": "Procedure",
"id": "16225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:23.654+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
> *
print COOKIES
11:31:19.034 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:19.619 [print] {
"resourceType": "Procedure",
"id": "16225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:23.654+02:00",
"source": "#OT6uadTcT11FhBa1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:20.379 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:20.979 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:24.989+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:24.989+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:20.979 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:21.580 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:21.580 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"doRGwwDNz21SP7Ml"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16226/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16226/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:21.580 [print] {
"resourceType": "Procedure",
"id": "16226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:26.205+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
> *
print COOKIES
11:31:21.580 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:21.589 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:21.589 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"doRGwwDNz21SP7Ml"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16226/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16226/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:21.589 [print] {
"resourceType": "Procedure",
"id": "16226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:26.205+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
> *
print COOKIES
11:31:21.589 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:22.190 [print] {
"resourceType": "Procedure",
"id": "16226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:26.205+02:00",
"source": "#doRGwwDNz21SP7Ml",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:22.860 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:23.679 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:27.475+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:27.475+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:23.679 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:24.339 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:24.339 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"omvWqf7wwSwaqwhF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16227/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16227/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:24.339 [print] {
"resourceType": "Procedure",
"id": "16227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:28.961+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
> *
print COOKIES
11:31:24.339 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:24.339 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:24.339 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"omvWqf7wwSwaqwhF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16227/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16227/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:24.339 [print] {
"resourceType": "Procedure",
"id": "16227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:28.961+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
> *
print COOKIES
11:31:24.339 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:24.919 [print] {
"resourceType": "Procedure",
"id": "16227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:28.961+02:00",
"source": "#omvWqf7wwSwaqwhF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:25.509 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:26.140 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:30.137+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:30.137+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:26.140 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:26.720 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:26.720 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6UGxS0NILjjBBxdw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16228/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16228/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:26.720 [print] {
"resourceType": "Procedure",
"id": "16228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:31.351+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-24"
}
> *
print COOKIES
11:31:26.720 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:26.720 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:26.720 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6UGxS0NILjjBBxdw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16228/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16228/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:26.729 [print] {
"resourceType": "Procedure",
"id": "16228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:31.351+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-24"
}
> *
print COOKIES
11:31:26.729 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:27.369 [print] {
"resourceType": "Procedure",
"id": "16228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:31.351+02:00",
"source": "#6UGxS0NILjjBBxdw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:28.000 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:28.922 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:32.607+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:32.607+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:28.922 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:29.569 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:29.569 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SVPu6YsG7obVaG0J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16229/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16229/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:29.569 [print] {
"resourceType": "Procedure",
"id": "16229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:34.171+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
> *
print COOKIES
11:31:29.569 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:29.569 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:29.569 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SVPu6YsG7obVaG0J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16229/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16229/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:29.569 [print] {
"resourceType": "Procedure",
"id": "16229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:34.171+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
> *
print COOKIES
11:31:29.569 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:30.176 [print] {
"resourceType": "Procedure",
"id": "16229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:34.171+02:00",
"source": "#SVPu6YsG7obVaG0J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:30.784 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:31.359 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:35.411+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:35.411+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:31.360 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:31.980 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:31.980 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dzUYHjjq5dBKUhbP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16230/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16230/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:31.980 [print] {
"resourceType": "Procedure",
"id": "16230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:36.601+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
> *
print COOKIES
11:31:31.980 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:31.980 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:31.980 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dzUYHjjq5dBKUhbP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16230/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16230/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:31.980 [print] {
"resourceType": "Procedure",
"id": "16230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:36.601+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
> *
print COOKIES
11:31:31.980 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:32.584 [print] {
"resourceType": "Procedure",
"id": "16230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:36.601+02:00",
"source": "#dzUYHjjq5dBKUhbP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:33.190 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:33.809 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:37.820+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:37.820+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:33.809 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:34.394 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:34.394 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"z5aN05wYPyVbNTJY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16231/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16231/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:34.394 [print] {
"resourceType": "Procedure",
"id": "16231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:39.021+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
> *
print COOKIES
11:31:34.394 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:34.394 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:34.394 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"z5aN05wYPyVbNTJY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16231/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16231/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:34.394 [print] {
"resourceType": "Procedure",
"id": "16231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:39.021+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
> *
print COOKIES
11:31:34.394 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:34.995 [print] {
"resourceType": "Procedure",
"id": "16231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:39.021+02:00",
"source": "#z5aN05wYPyVbNTJY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:35.801 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:36.430 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:40.429+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:40.429+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:36.431 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:37.071 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:37.071 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V4mRxTPEi6W1mrcL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16232/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16232/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:37.071 [print] {
"resourceType": "Procedure",
"id": "16232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:41.682+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
> *
print COOKIES
11:31:37.071 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:37.073 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:37.073 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V4mRxTPEi6W1mrcL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16232/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16232/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:37.073 [print] {
"resourceType": "Procedure",
"id": "16232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:41.682+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
> *
print COOKIES
11:31:37.073 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:37.885 [print] {
"resourceType": "Procedure",
"id": "16232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:41.682+02:00",
"source": "#V4mRxTPEi6W1mrcL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:38.768 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:39.384 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:43.396+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:43.396+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:39.384 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:39.975 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:39.975 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p0g3qDnUP8Ise3bd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16233/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16233/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:39.975 [print] {
"resourceType": "Procedure",
"id": "16233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:44.599+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
> *
print COOKIES
11:31:39.975 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:39.977 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:39.977 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p0g3qDnUP8Ise3bd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16233/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16233/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:39.977 [print] {
"resourceType": "Procedure",
"id": "16233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:44.599+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
> *
print COOKIES
11:31:39.977 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:40.595 [print] {
"resourceType": "Procedure",
"id": "16233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:44.599+02:00",
"source": "#p0g3qDnUP8Ise3bd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:42.224 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:42.860 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:46.861+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:46.861+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:42.860 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:43.492 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:43.492 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YrkIFPoXBzVccN2X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16234/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16234/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:43.492 [print] {
"resourceType": "Procedure",
"id": "16234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:48.124+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
> *
print COOKIES
11:31:43.492 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:43.492 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:43.492 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YrkIFPoXBzVccN2X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16234/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16234/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:43.492 [print] {
"resourceType": "Procedure",
"id": "16234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:48.124+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
> *
print COOKIES
11:31:43.492 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:44.120 [print] {
"resourceType": "Procedure",
"id": "16234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:48.124+02:00",
"source": "#YrkIFPoXBzVccN2X",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:45.012 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:45.623 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:49.656+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:49.656+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:45.623 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:46.244 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:46.244 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WJHqqwzVkV00f89E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16235/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16235/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:46.244 [print] {
"resourceType": "Procedure",
"id": "16235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:50.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
> *
print COOKIES
11:31:46.244 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:46.246 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:46.246 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WJHqqwzVkV00f89E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16235/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16235/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:46.246 [print] {
"resourceType": "Procedure",
"id": "16235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:50.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
> *
print COOKIES
11:31:46.246 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:47.850 [print] {
"resourceType": "Procedure",
"id": "16235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:50.878+02:00",
"source": "#WJHqqwzVkV00f89E",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:48.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:49.117 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:53.122+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:53.122+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:49.117 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:49.761 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:49.761 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bP9Yo9BQMyzMvMI4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16236/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16236/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:49.761 [print] {
"resourceType": "Procedure",
"id": "16236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:54.382+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
> *
print COOKIES
11:31:49.761 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:49.762 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:49.762 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bP9Yo9BQMyzMvMI4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16236/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16236/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:49.762 [print] {
"resourceType": "Procedure",
"id": "16236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:54.382+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
> *
print COOKIES
11:31:49.763 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:50.326 [print] {
"resourceType": "Procedure",
"id": "16236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:54.382+02:00",
"source": "#bP9Yo9BQMyzMvMI4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:50.931 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:51.599 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:55.562+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:55.562+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:51.601 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:52.303 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:52.303 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vRO1MIed9BA8luim"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16237/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16237/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:52.303 [print] {
"resourceType": "Procedure",
"id": "16237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:56.936+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
> *
print COOKIES
11:31:52.303 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:52.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:52.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vRO1MIed9BA8luim"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16237/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16237/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:52.305 [print] {
"resourceType": "Procedure",
"id": "16237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:56.936+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
> *
print COOKIES
11:31:52.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:52.945 [print] {
"resourceType": "Procedure",
"id": "16237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:56.936+02:00",
"source": "#vRO1MIed9BA8luim",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:53.904 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:54.536 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:31:58.550+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:31:58.550+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:54.537 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:55.141 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:55.141 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dvurncR7x9Kcqoso"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16238/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16238/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:55.142 [print] {
"resourceType": "Procedure",
"id": "16238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:59.779+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
> *
print COOKIES
11:31:55.142 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:55.143 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:55.143 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dvurncR7x9Kcqoso"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16238/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:31:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16238/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:31:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:55.143 [print] {
"resourceType": "Procedure",
"id": "16238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:59.779+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
> *
print COOKIES
11:31:55.143 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:55.903 [print] {
"resourceType": "Procedure",
"id": "16238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:31:59.779+02:00",
"source": "#dvurncR7x9Kcqoso",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:56.493 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:57.118 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:01.128+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:01.128+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:57.119 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:57.730 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:57.730 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j5JvrwGtiP6y1yeP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16239/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16239/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:57.730 [print] {
"resourceType": "Procedure",
"id": "16239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:02.372+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
> *
print COOKIES
11:31:57.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:57.732 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:57.732 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j5JvrwGtiP6y1yeP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16239/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16239/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:57.732 [print] {
"resourceType": "Procedure",
"id": "16239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:02.372+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
> *
print COOKIES
11:31:57.732 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:58.351 [print] {
"resourceType": "Procedure",
"id": "16239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:02.372+02:00",
"source": "#j5JvrwGtiP6y1yeP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:59.150 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:00.080 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:03.788+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:03.788+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:00.080 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:00.676 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:00.676 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sE88wP834i03M5DH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16240/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16240/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:00.676 [print] {
"resourceType": "Procedure",
"id": "16240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:05.321+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
> *
print COOKIES
11:32:00.676 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:00.677 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:00.677 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sE88wP834i03M5DH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16240/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16240/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:00.677 [print] {
"resourceType": "Procedure",
"id": "16240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:05.321+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
> *
print COOKIES
11:32:00.677 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:01.321 [print] {
"resourceType": "Procedure",
"id": "16240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:05.321+02:00",
"source": "#sE88wP834i03M5DH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:02.149 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:03.535 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:06.794+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:06.794+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:03.535 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:04.169 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:04.169 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VL49lpku40J8apWn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16241/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16241/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:04.169 [print] {
"resourceType": "Procedure",
"id": "16241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:08.809+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
> *
print COOKIES
11:32:04.169 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:04.170 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:04.170 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VL49lpku40J8apWn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16241/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16241/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:04.170 [print] {
"resourceType": "Procedure",
"id": "16241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:08.809+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
> *
print COOKIES
11:32:04.170 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:04.808 [print] {
"resourceType": "Procedure",
"id": "16241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:08.809+02:00",
"source": "#VL49lpku40J8apWn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:05.451 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:06.040 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:10.085+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:10.085+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:06.040 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:06.632 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:06.632 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fQHaGlQJdtaWxMeR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16242/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16242/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:06.632 [print] {
"resourceType": "Procedure",
"id": "16242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:11.275+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
> *
print COOKIES
11:32:06.632 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:06.634 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:06.634 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fQHaGlQJdtaWxMeR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16242/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16242/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:06.634 [print] {
"resourceType": "Procedure",
"id": "16242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:11.275+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
> *
print COOKIES
11:32:06.634 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:07.262 [print] {
"resourceType": "Procedure",
"id": "16242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:11.275+02:00",
"source": "#fQHaGlQJdtaWxMeR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:07.905 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:08.495 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:12.512+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:12.512+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:08.496 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:09.119 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:09.119 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X58gONF59ilB8r81"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16243/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16243/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:09.119 [print] {
"resourceType": "Procedure",
"id": "16243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:13.765+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
> *
print COOKIES
11:32:09.119 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:09.121 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:09.121 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X58gONF59ilB8r81"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16243/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16243/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:09.121 [print] {
"resourceType": "Procedure",
"id": "16243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:13.765+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
> *
print COOKIES
11:32:09.121 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:09.880 [print] {
"resourceType": "Procedure",
"id": "16243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:13.765+02:00",
"source": "#X58gONF59ilB8r81",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:10.491 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:11.144 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:15.150+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:15.150+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:11.144 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:11.776 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:11.776 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5y1HazEYNFgS115t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16244/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16244/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:11.776 [print] {
"resourceType": "Procedure",
"id": "16244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:16.428+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
> *
print COOKIES
11:32:11.776 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:11.776 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:11.776 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5y1HazEYNFgS115t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16244/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16244/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:11.776 [print] {
"resourceType": "Procedure",
"id": "16244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:16.428+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
> *
print COOKIES
11:32:11.776 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:12.607 [print] {
"resourceType": "Procedure",
"id": "16244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:16.428+02:00",
"source": "#5y1HazEYNFgS115t",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:13.266 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:13.959 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:17.909+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:17.909+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:13.959 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:14.574 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:14.574 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Bka4T0UqR1hMPThK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16245/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16245/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:14.574 [print] {
"resourceType": "Procedure",
"id": "16245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:19.237+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
> *
print COOKIES
11:32:14.574 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:14.589 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:14.589 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Bka4T0UqR1hMPThK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16245/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16245/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:14.589 [print] {
"resourceType": "Procedure",
"id": "16245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:19.237+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
> *
print COOKIES
11:32:14.589 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:15.198 [print] {
"resourceType": "Procedure",
"id": "16245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:19.237+02:00",
"source": "#Bka4T0UqR1hMPThK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:15.773 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:16.429 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:20.436+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:20.436+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:16.430 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:16.989 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:16.989 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AoXgloKpNX7Iz9ab"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16246/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16246/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:16.989 [print] {
"resourceType": "Procedure",
"id": "16246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:21.644+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
> *
print COOKIES
11:32:16.989 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:16.989 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:16.989 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AoXgloKpNX7Iz9ab"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16246/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16246/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:16.989 [print] {
"resourceType": "Procedure",
"id": "16246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:21.644+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
> *
print COOKIES
11:32:16.989 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:17.614 [print] {
"resourceType": "Procedure",
"id": "16246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:21.644+02:00",
"source": "#AoXgloKpNX7Iz9ab",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:18.257 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:18.918 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:22.915+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:22.915+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:18.918 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:19.499 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:19.499 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W40N4gGfTlfREXR1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16247/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16247/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:19.499 [print] {
"resourceType": "Procedure",
"id": "16247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:24.147+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
> *
print COOKIES
11:32:19.499 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:19.500 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:19.500 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W40N4gGfTlfREXR1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16247/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16247/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:19.500 [print] {
"resourceType": "Procedure",
"id": "16247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:24.147+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
> *
print COOKIES
11:32:19.500 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:20.179 [print] {
"resourceType": "Procedure",
"id": "16247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:24.147+02:00",
"source": "#W40N4gGfTlfREXR1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:21.097 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:21.785 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:25.746+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:25.746+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:21.786 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:22.420 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:22.420 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oVo8uxeeVwz4BaBC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16248/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16248/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:22.420 [print] {
"resourceType": "Procedure",
"id": "16248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:27.073+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
> *
print COOKIES
11:32:22.420 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:22.422 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:22.422 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oVo8uxeeVwz4BaBC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16248/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16248/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:22.422 [print] {
"resourceType": "Procedure",
"id": "16248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:27.073+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
> *
print COOKIES
11:32:22.422 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:23.079 [print] {
"resourceType": "Procedure",
"id": "16248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:27.073+02:00",
"source": "#oVo8uxeeVwz4BaBC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:23.726 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:24.303 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:28.382+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:28.382+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:24.305 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:25.139 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:25.139 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ldvvOC6S2fVyWwZI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16249/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16249/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:25.139 [print] {
"resourceType": "Procedure",
"id": "16249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:29.571+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
> *
print COOKIES
11:32:25.139 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:25.140 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:25.140 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ldvvOC6S2fVyWwZI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16249/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16249/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:25.140 [print] {
"resourceType": "Procedure",
"id": "16249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:29.571+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
> *
print COOKIES
11:32:25.140 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:31.099 [print] {
"resourceType": "Procedure",
"id": "16249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:29.571+02:00",
"source": "#ldvvOC6S2fVyWwZI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:31.684 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:32.327 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:36.351+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:36.351+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:32.328 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:34.253 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:34.253 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"x9O03zkAlMj46IO7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16250/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16250/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:34.253 [print] {
"resourceType": "Procedure",
"id": "16250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:38.915+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
> *
print COOKIES
11:32:34.253 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:34.255 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:34.255 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"x9O03zkAlMj46IO7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16250/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16250/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:34.255 [print] {
"resourceType": "Procedure",
"id": "16250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:38.915+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
> *
print COOKIES
11:32:34.255 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:35.073 [print] {
"resourceType": "Procedure",
"id": "16250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:38.915+02:00",
"source": "#x9O03zkAlMj46IO7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:35.731 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:36.608 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:40.391+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:40.391+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:36.609 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:37.254 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:37.254 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rEZQLuhyILvW5GYc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16251/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16251/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:37.254 [print] {
"resourceType": "Procedure",
"id": "16251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:41.906+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
> *
print COOKIES
11:32:37.254 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:37.255 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:37.255 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rEZQLuhyILvW5GYc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16251/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16251/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:37.255 [print] {
"resourceType": "Procedure",
"id": "16251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:41.906+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
> *
print COOKIES
11:32:37.255 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:37.860 [print] {
"resourceType": "Procedure",
"id": "16251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:41.906+02:00",
"source": "#rEZQLuhyILvW5GYc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:39.441 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:40.092 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:44.108+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:44.108+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:40.093 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:40.689 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:40.689 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7ByvXouzCwGY7sa8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16252/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16252/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:40.689 [print] {
"resourceType": "Procedure",
"id": "16252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:45.345+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
> *
print COOKIES
11:32:40.690 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:40.691 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:40.691 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7ByvXouzCwGY7sa8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16252/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16252/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:40.691 [print] {
"resourceType": "Procedure",
"id": "16252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:45.345+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
> *
print COOKIES
11:32:40.691 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:41.303 [print] {
"resourceType": "Procedure",
"id": "16252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:45.345+02:00",
"source": "#7ByvXouzCwGY7sa8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:41.890 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:42.514 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:46.558+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:46.558+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:42.514 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:43.105 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:43.105 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JtuxHwW6j2cqggY1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16253/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16253/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:43.105 [print] {
"resourceType": "Procedure",
"id": "16253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:47.763+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
> *
print COOKIES
11:32:43.105 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:43.106 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:43.106 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JtuxHwW6j2cqggY1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16253/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16253/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:43.106 [print] {
"resourceType": "Procedure",
"id": "16253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:47.763+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
> *
print COOKIES
11:32:43.106 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:43.955 [print] {
"resourceType": "Procedure",
"id": "16253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:47.763+02:00",
"source": "#JtuxHwW6j2cqggY1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:44.584 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:46.173 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:49.242+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:49.242+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:46.173 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:46.749 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:46.749 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"33DNeiqeg0LmivQs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16254/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16254/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:46.749 [print] {
"resourceType": "Procedure",
"id": "16254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:51.418+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
> *
print COOKIES
11:32:46.749 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:46.750 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:46.750 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"33DNeiqeg0LmivQs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16254/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16254/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:46.751 [print] {
"resourceType": "Procedure",
"id": "16254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:51.418+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
> *
print COOKIES
11:32:46.751 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:47.326 [print] {
"resourceType": "Procedure",
"id": "16254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:51.418+02:00",
"source": "#33DNeiqeg0LmivQs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:47.898 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:48.553 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:52.570+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:52.570+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:48.554 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:49.180 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:49.180 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GE0EMywUhsEakCL3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16255/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16255/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:49.180 [print] {
"resourceType": "Procedure",
"id": "16255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:53.852+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
> *
print COOKIES
11:32:49.180 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:49.181 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:49.181 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GE0EMywUhsEakCL3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16255/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16255/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:49.181 [print] {
"resourceType": "Procedure",
"id": "16255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:53.852+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
> *
print COOKIES
11:32:49.181 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:49.762 [print] {
"resourceType": "Procedure",
"id": "16255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:53.852+02:00",
"source": "#GE0EMywUhsEakCL3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:50.356 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:51.962 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:55.013+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:55.013+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:51.962 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:52.601 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:52.601 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XmkLFOa1tzkxoHdW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16256/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16256/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:52.601 [print] {
"resourceType": "Procedure",
"id": "16256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:57.281+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
> *
print COOKIES
11:32:52.601 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:52.601 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:52.601 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XmkLFOa1tzkxoHdW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16256/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16256/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:52.601 [print] {
"resourceType": "Procedure",
"id": "16256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:57.281+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
> *
print COOKIES
11:32:52.601 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:53.203 [print] {
"resourceType": "Procedure",
"id": "16256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:57.281+02:00",
"source": "#XmkLFOa1tzkxoHdW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:53.817 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:54.402 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:32:58.494+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:32:58.494+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:54.402 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:54.987 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:54.987 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OMpXpY8kAEJXENL1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16257/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16257/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:54.987 [print] {
"resourceType": "Procedure",
"id": "16257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:59.665+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
> *
print COOKIES
11:32:54.987 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:54.987 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:54.987 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OMpXpY8kAEJXENL1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16257/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:32:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16257/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:32:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:54.987 [print] {
"resourceType": "Procedure",
"id": "16257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:59.665+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
> *
print COOKIES
11:32:54.987 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:55.618 [print] {
"resourceType": "Procedure",
"id": "16257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:32:59.665+02:00",
"source": "#OMpXpY8kAEJXENL1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:56.248 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:56.833 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:00.923+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:00.923+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:56.833 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:57.452 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:57.452 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2VwwJPA6Um2lut5m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16258/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16258/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:57.452 [print] {
"resourceType": "Procedure",
"id": "16258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:02.132+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
> *
print COOKIES
11:32:57.452 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:57.452 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:57.452 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2VwwJPA6Um2lut5m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16258/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16258/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:57.452 [print] {
"resourceType": "Procedure",
"id": "16258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:02.132+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
> *
print COOKIES
11:32:57.452 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:58.056 [print] {
"resourceType": "Procedure",
"id": "16258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:02.132+02:00",
"source": "#2VwwJPA6Um2lut5m",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:58.640 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:59.256 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:03.314+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:03.314+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:59.256 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:59.870 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:59.870 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QeYkJAIyCjjJqTUz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16259/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16259/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:59.870 [print] {
"resourceType": "Procedure",
"id": "16259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:04.551+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
> *
print COOKIES
11:32:59.870 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:59.870 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:59.870 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QeYkJAIyCjjJqTUz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16259/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16259/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:59.870 [print] {
"resourceType": "Procedure",
"id": "16259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:04.551+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
> *
print COOKIES
11:32:59.870 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:00.456 [print] {
"resourceType": "Procedure",
"id": "16259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:04.551+02:00",
"source": "#QeYkJAIyCjjJqTUz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:01.075 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:01.646 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:05.738+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:05.738+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:01.646 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:02.288 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:02.288 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vp6RUCoeGLAhCdzF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16260/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16260/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:02.288 [print] {
"resourceType": "Procedure",
"id": "16260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:06.956+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
> *
print COOKIES
11:33:02.288 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:02.288 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:02.288 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vp6RUCoeGLAhCdzF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16260/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16260/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:02.288 [print] {
"resourceType": "Procedure",
"id": "16260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:06.956+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
> *
print COOKIES
11:33:02.288 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:02.907 [print] {
"resourceType": "Procedure",
"id": "16260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:06.956+02:00",
"source": "#vp6RUCoeGLAhCdzF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:04.910 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:05.977 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:09.596+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:09.596+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:05.977 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:06.635 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:06.635 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JlQH7O7AzlzJJkeE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16261/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16261/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:06.635 [print] {
"resourceType": "Procedure",
"id": "16261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:11.309+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
> *
print COOKIES
11:33:06.635 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:06.635 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:06.635 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JlQH7O7AzlzJJkeE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16261/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16261/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:06.635 [print] {
"resourceType": "Procedure",
"id": "16261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:11.309+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
> *
print COOKIES
11:33:06.635 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:07.265 [print] {
"resourceType": "Procedure",
"id": "16261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:11.309+02:00",
"source": "#JlQH7O7AzlzJJkeE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:07.869 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:08.526 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:12.556+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:12.556+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:08.526 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:09.165 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:09.165 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SCrbALBvJKh8CyhF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16262/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16262/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:09.165 [print] {
"resourceType": "Procedure",
"id": "16262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:13.836+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
> *
print COOKIES
11:33:09.166 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:09.167 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:09.167 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SCrbALBvJKh8CyhF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16262/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16262/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:09.167 [print] {
"resourceType": "Procedure",
"id": "16262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:13.836+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
> *
print COOKIES
11:33:09.167 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:09.764 [print] {
"resourceType": "Procedure",
"id": "16262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:13.836+02:00",
"source": "#SCrbALBvJKh8CyhF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:10.384 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:11.008 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:15.074+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:15.074+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:11.008 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:11.593 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:11.593 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4HDIhLqoSBbvlymI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16263/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16263/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:11.593 [print] {
"resourceType": "Procedure",
"id": "16263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:16.280+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
> *
print COOKIES
11:33:11.593 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:11.593 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:11.593 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4HDIhLqoSBbvlymI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16263/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16263/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:11.593 [print] {
"resourceType": "Procedure",
"id": "16263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:16.280+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
> *
print COOKIES
11:33:11.593 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:12.231 [print] {
"resourceType": "Procedure",
"id": "16263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:16.280+02:00",
"source": "#4HDIhLqoSBbvlymI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:12.839 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:13.606 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:17.521+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:17.521+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:13.606 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:14.265 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:14.265 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yiXw7N2CTtq65XRH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16264/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16264/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:14.265 [print] {
"resourceType": "Procedure",
"id": "16264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:18.946+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-23"
}
> *
print COOKIES
11:33:14.265 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:14.267 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:14.267 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yiXw7N2CTtq65XRH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16264/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16264/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:14.267 [print] {
"resourceType": "Procedure",
"id": "16264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:18.946+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-23"
}
> *
print COOKIES
11:33:14.267 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:14.881 [print] {
"resourceType": "Procedure",
"id": "16264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:18.946+02:00",
"source": "#yiXw7N2CTtq65XRH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:15.485 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:16.106 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:20.170+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:20.170+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:16.107 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:16.722 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:16.722 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oDDy7rDjk9WPVsN1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16265/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16265/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:16.722 [print] {
"resourceType": "Procedure",
"id": "16265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:21.399+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
> *
print COOKIES
11:33:16.722 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:16.723 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:16.723 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oDDy7rDjk9WPVsN1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16265/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16265/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:16.723 [print] {
"resourceType": "Procedure",
"id": "16265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:21.399+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
> *
print COOKIES
11:33:16.723 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:17.348 [print] {
"resourceType": "Procedure",
"id": "16265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:21.399+02:00",
"source": "#oDDy7rDjk9WPVsN1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:17.971 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:18.680 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:22.651+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:22.651+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:18.681 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:19.294 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:19.294 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qiYrrKdp380je7oz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16266/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16266/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:19.294 [print] {
"resourceType": "Procedure",
"id": "16266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:23.972+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
> *
print COOKIES
11:33:19.294 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:19.296 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:19.296 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qiYrrKdp380je7oz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16266/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16266/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:19.296 [print] {
"resourceType": "Procedure",
"id": "16266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:23.972+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
> *
print COOKIES
11:33:19.296 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:19.903 [print] {
"resourceType": "Procedure",
"id": "16266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:23.972+02:00",
"source": "#qiYrrKdp380je7oz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:20.484 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:21.065 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:25.162+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:25.162+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:21.066 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:21.689 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:21.689 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cnAs3WSfN56NusdG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16267/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16267/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:21.689 [print] {
"resourceType": "Procedure",
"id": "16267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:26.366+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
> *
print COOKIES
11:33:21.689 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:21.689 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:21.689 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cnAs3WSfN56NusdG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16267/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16267/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:21.689 [print] {
"resourceType": "Procedure",
"id": "16267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:26.366+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
> *
print COOKIES
11:33:21.689 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:22.286 [print] {
"resourceType": "Procedure",
"id": "16267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:26.366+02:00",
"source": "#cnAs3WSfN56NusdG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:22.938 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:23.551 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:27.611+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:27.611+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:23.552 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:24.144 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:24.144 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oOPoKHO9LO1aeEf8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16268/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16268/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:24.144 [print] {
"resourceType": "Procedure",
"id": "16268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:28.834+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
> *
print COOKIES
11:33:24.144 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:24.144 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:24.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oOPoKHO9LO1aeEf8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16268/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16268/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:24.146 [print] {
"resourceType": "Procedure",
"id": "16268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:28.834+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
> *
print COOKIES
11:33:24.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:24.735 [print] {
"resourceType": "Procedure",
"id": "16268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:28.834+02:00",
"source": "#oOPoKHO9LO1aeEf8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:25.376 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:25.980 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:30.054+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:30.054+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:25.980 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:26.611 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:26.611 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fjUxsVtivFeXmkBN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16269/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16269/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:26.611 [print] {
"resourceType": "Procedure",
"id": "16269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:31.295+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
> *
print COOKIES
11:33:26.611 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:26.611 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:26.611 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fjUxsVtivFeXmkBN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16269/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16269/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:26.611 [print] {
"resourceType": "Procedure",
"id": "16269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:31.295+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
> *
print COOKIES
11:33:26.611 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:27.212 [print] {
"resourceType": "Procedure",
"id": "16269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:31.295+02:00",
"source": "#fjUxsVtivFeXmkBN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:28.036 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:28.638 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:32.534+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:32.534+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:28.638 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:29.269 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:29.269 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6AI3SdQkqP7uXA1d"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16270/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16270/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:29.269 [print] {
"resourceType": "Procedure",
"id": "16270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:33.957+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
> *
print COOKIES
11:33:29.269 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:29.269 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:29.269 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6AI3SdQkqP7uXA1d"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16270/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16270/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:29.269 [print] {
"resourceType": "Procedure",
"id": "16270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:33.957+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
> *
print COOKIES
11:33:29.269 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:29.916 [print] {
"resourceType": "Procedure",
"id": "16270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:33.957+02:00",
"source": "#6AI3SdQkqP7uXA1d",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:30.520 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:31.134 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:35.212+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:35.212+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:31.134 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:31.820 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:31.820 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bgJ02Or6ByfzsQWV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16271/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16271/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:31.820 [print] {
"resourceType": "Procedure",
"id": "16271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:36.487+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
> *
print COOKIES
11:33:31.820 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:31.822 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:31.822 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bgJ02Or6ByfzsQWV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16271/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16271/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:31.822 [print] {
"resourceType": "Procedure",
"id": "16271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:36.487+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
> *
print COOKIES
11:33:31.822 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:32.481 [print] {
"resourceType": "Procedure",
"id": "16271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:36.487+02:00",
"source": "#bgJ02Or6ByfzsQWV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:33.080 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:33.729 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:37.775+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:37.775+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:33.729 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:34.296 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:34.296 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IpdqUfujIhsMxuY7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16272/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16272/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:34.296 [print] {
"resourceType": "Procedure",
"id": "16272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:38.992+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
> *
print COOKIES
11:33:34.296 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:34.296 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:34.296 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IpdqUfujIhsMxuY7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16272/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16272/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:34.296 [print] {
"resourceType": "Procedure",
"id": "16272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:38.992+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
> *
print COOKIES
11:33:34.296 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:34.943 [print] {
"resourceType": "Procedure",
"id": "16272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:38.992+02:00",
"source": "#IpdqUfujIhsMxuY7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:35.554 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:36.146 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:40.261+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:40.261+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:36.146 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:36.778 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:36.778 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OIezoQQsbYIRCJf8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16273/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16273/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:36.778 [print] {
"resourceType": "Procedure",
"id": "16273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:41.481+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
> *
print COOKIES
11:33:36.778 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:36.778 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:36.778 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OIezoQQsbYIRCJf8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16273/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16273/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:36.778 [print] {
"resourceType": "Procedure",
"id": "16273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:41.481+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
> *
print COOKIES
11:33:36.778 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:37.489 [print] {
"resourceType": "Procedure",
"id": "16273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:41.481+02:00",
"source": "#OIezoQQsbYIRCJf8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:38.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:38.711 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:42.781+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:42.781+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:38.712 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:39.344 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:39.344 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bvapvk1b5dsaMeCj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16274/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16274/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:39.344 [print] {
"resourceType": "Procedure",
"id": "16274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:44.039+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
> *
print COOKIES
11:33:39.344 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:39.346 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:39.346 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bvapvk1b5dsaMeCj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16274/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16274/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:39.346 [print] {
"resourceType": "Procedure",
"id": "16274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:44.039+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
> *
print COOKIES
11:33:39.346 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:39.939 [print] {
"resourceType": "Procedure",
"id": "16274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:44.039+02:00",
"source": "#bvapvk1b5dsaMeCj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:40.542 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:41.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:45.237+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:45.237+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:41.181 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:41.789 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:41.789 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vlUGuPZdiNhVfN8i"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16275/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16275/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:41.789 [print] {
"resourceType": "Procedure",
"id": "16275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:46.488+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
> *
print COOKIES
11:33:41.789 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:41.791 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:41.791 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vlUGuPZdiNhVfN8i"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16275/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16275/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:41.791 [print] {
"resourceType": "Procedure",
"id": "16275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:46.488+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
> *
print COOKIES
11:33:41.791 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:42.416 [print] {
"resourceType": "Procedure",
"id": "16275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:46.488+02:00",
"source": "#vlUGuPZdiNhVfN8i",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:43.042 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:43.659 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:47.736+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:47.736+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:43.660 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:44.269 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:44.269 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sDk3prg2MkpAlsSx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16276/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16276/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:44.269 [print] {
"resourceType": "Procedure",
"id": "16276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:48.967+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:33:44.269 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:44.269 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:44.269 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sDk3prg2MkpAlsSx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16276/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16276/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:44.269 [print] {
"resourceType": "Procedure",
"id": "16276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:48.967+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:33:44.269 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:44.887 [print] {
"resourceType": "Procedure",
"id": "16276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:48.967+02:00",
"source": "#sDk3prg2MkpAlsSx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:45.477 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:46.050 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:50.177+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:50.177+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:46.052 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:47.006 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:47.006 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i9d6j78togoJolj4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16277/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16277/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:47.006 [print] {
"resourceType": "Procedure",
"id": "16277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:51.694+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
> *
print COOKIES
11:33:47.006 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:47.006 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:47.006 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i9d6j78togoJolj4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16277/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16277/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:47.006 [print] {
"resourceType": "Procedure",
"id": "16277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:51.694+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
> *
print COOKIES
11:33:47.006 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:48.048 [print] {
"resourceType": "Procedure",
"id": "16277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:51.694+02:00",
"source": "#i9d6j78togoJolj4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:48.686 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:49.493 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:53.388+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:53.388+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:49.493 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:50.720 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:50.720 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fKGH78U9eCjmKQlS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16278/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16278/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:50.720 [print] {
"resourceType": "Procedure",
"id": "16278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:55.436+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
> *
print COOKIES
11:33:50.720 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:50.736 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:50.736 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fKGH78U9eCjmKQlS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16278/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16278/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:50.736 [print] {
"resourceType": "Procedure",
"id": "16278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:55.436+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
> *
print COOKIES
11:33:50.736 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:51.335 [print] {
"resourceType": "Procedure",
"id": "16278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:55.436+02:00",
"source": "#fKGH78U9eCjmKQlS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:51.951 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:52.589 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:56.649+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:56.649+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:52.589 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:53.391 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:53.391 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zDSFnrlgFvk0Mw8A"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16279/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16279/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:53.391 [print] {
"resourceType": "Procedure",
"id": "16279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:58.108+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
> *
print COOKIES
11:33:53.391 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:53.407 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:53.407 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zDSFnrlgFvk0Mw8A"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16279/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:33:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16279/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:33:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:53.407 [print] {
"resourceType": "Procedure",
"id": "16279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:58.108+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
> *
print COOKIES
11:33:53.407 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:53.980 [print] {
"resourceType": "Procedure",
"id": "16279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:33:58.108+02:00",
"source": "#zDSFnrlgFvk0Mw8A",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:54.569 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:55.133 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:33:59.276+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:33:59.276+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:55.133 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:55.747 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:55.747 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9SDZle2HNyatWosf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16280/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16280/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:55.747 [print] {
"resourceType": "Procedure",
"id": "16280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:00.447+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
> *
print COOKIES
11:33:55.747 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:55.748 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:55.748 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9SDZle2HNyatWosf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16280/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16280/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:55.748 [print] {
"resourceType": "Procedure",
"id": "16280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:00.447+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
> *
print COOKIES
11:33:55.748 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:56.395 [print] {
"resourceType": "Procedure",
"id": "16280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:00.447+02:00",
"source": "#9SDZle2HNyatWosf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:57.028 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:57.635 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:01.729+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:01.729+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:57.636 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:58.622 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:58.622 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yNKLLbWelYid2H9N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16281/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16281/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:58.622 [print] {
"resourceType": "Procedure",
"id": "16281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:03.324+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
> *
print COOKIES
11:33:58.622 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:58.623 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:58.623 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yNKLLbWelYid2H9N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16281/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16281/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:58.623 [print] {
"resourceType": "Procedure",
"id": "16281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:03.324+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
> *
print COOKIES
11:33:58.623 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:59.223 [print] {
"resourceType": "Procedure",
"id": "16281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:03.324+02:00",
"source": "#yNKLLbWelYid2H9N",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:59.904 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:00.519 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:04.606+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:04.606+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:00.519 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:01.148 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:01.148 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"naw2YQbczxGlJRlE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16282/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16282/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:01.148 [print] {
"resourceType": "Procedure",
"id": "16282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:05.856+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
> *
print COOKIES
11:34:01.148 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:01.148 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:01.148 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"naw2YQbczxGlJRlE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16282/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16282/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:01.148 [print] {
"resourceType": "Procedure",
"id": "16282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:05.856+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
> *
print COOKIES
11:34:01.148 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:01.715 [print] {
"resourceType": "Procedure",
"id": "16282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:05.856+02:00",
"source": "#naw2YQbczxGlJRlE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:03.318 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:03.914 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:08.028+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:08.028+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:03.915 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:04.489 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:04.489 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0OX07T5kBNuQmWZ5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16283/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16283/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:04.489 [print] {
"resourceType": "Procedure",
"id": "16283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:09.198+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
> *
print COOKIES
11:34:04.489 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:04.490 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:04.490 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0OX07T5kBNuQmWZ5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16283/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16283/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:04.490 [print] {
"resourceType": "Procedure",
"id": "16283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:09.198+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
> *
print COOKIES
11:34:04.490 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:05.246 [print] {
"resourceType": "Procedure",
"id": "16283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:09.198+02:00",
"source": "#0OX07T5kBNuQmWZ5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:05.834 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:06.465 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:10.543+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:10.543+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:06.465 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:07.032 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:07.032 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vjAkZhKhcOTmSRWi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16284/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16284/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:07.032 [print] {
"resourceType": "Procedure",
"id": "16284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:11.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
> *
print COOKIES
11:34:07.032 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:07.032 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:07.032 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vjAkZhKhcOTmSRWi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16284/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16284/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:07.032 [print] {
"resourceType": "Procedure",
"id": "16284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:11.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
> *
print COOKIES
11:34:07.032 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:07.670 [print] {
"resourceType": "Procedure",
"id": "16284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:11.757+02:00",
"source": "#vjAkZhKhcOTmSRWi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:08.255 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:08.830 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:12.977+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:12.977+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:08.830 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:09.467 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:09.467 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X4dG6UrsvAiXsbn4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16285/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16285/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:09.467 [print] {
"resourceType": "Procedure",
"id": "16285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:14.172+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
> *
print COOKIES
11:34:09.467 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:09.469 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:09.469 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X4dG6UrsvAiXsbn4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16285/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16285/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:09.469 [print] {
"resourceType": "Procedure",
"id": "16285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:14.172+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
> *
print COOKIES
11:34:09.469 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:10.080 [print] {
"resourceType": "Procedure",
"id": "16285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:14.172+02:00",
"source": "#X4dG6UrsvAiXsbn4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:10.734 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:11.348 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:15.441+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:15.441+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:11.348 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:11.968 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:11.968 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gaEN7sLpL5Dm0NY3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16286/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16286/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:11.968 [print] {
"resourceType": "Procedure",
"id": "16286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:16.679+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
> *
print COOKIES
11:34:11.968 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:11.969 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:11.969 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gaEN7sLpL5Dm0NY3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16286/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16286/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:11.969 [print] {
"resourceType": "Procedure",
"id": "16286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:16.679+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
> *
print COOKIES
11:34:11.969 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:12.977 [print] {
"resourceType": "Procedure",
"id": "16286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:16.679+02:00",
"source": "#gaEN7sLpL5Dm0NY3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:13.561 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:15.162 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:18.285+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:18.285+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:15.162 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:15.793 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:15.793 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RMMzbFlhwBM7gjCB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16287/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16287/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:15.793 [print] {
"resourceType": "Procedure",
"id": "16287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:20.513+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
> *
print COOKIES
11:34:15.793 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:15.793 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:15.793 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RMMzbFlhwBM7gjCB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16287/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16287/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:15.793 [print] {
"resourceType": "Procedure",
"id": "16287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:20.513+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
> *
print COOKIES
11:34:15.793 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:16.423 [print] {
"resourceType": "Procedure",
"id": "16287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:20.513+02:00",
"source": "#RMMzbFlhwBM7gjCB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:17.056 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:17.691 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:21.773+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:21.773+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:17.691 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:18.507 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:18.507 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qAOb9W7g7N5DGqS3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16288/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16288/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:18.507 [print] {
"resourceType": "Procedure",
"id": "16288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:22.999+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
> *
print COOKIES
11:34:18.507 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:18.507 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:18.507 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qAOb9W7g7N5DGqS3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16288/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16288/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:18.507 [print] {
"resourceType": "Procedure",
"id": "16288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:22.999+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
> *
print COOKIES
11:34:18.507 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:19.097 [print] {
"resourceType": "Procedure",
"id": "16288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:22.999+02:00",
"source": "#qAOb9W7g7N5DGqS3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:19.727 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:20.294 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:24.448+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:24.448+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:20.295 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:20.957 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:20.957 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g6oLQKTxnvxzRR0g"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16289/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16289/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:20.957 [print] {
"resourceType": "Procedure",
"id": "16289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:25.613+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
> *
print COOKIES
11:34:20.957 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:20.959 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:20.959 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g6oLQKTxnvxzRR0g"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16289/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16289/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:20.959 [print] {
"resourceType": "Procedure",
"id": "16289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:25.613+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
> *
print COOKIES
11:34:20.959 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:21.547 [print] {
"resourceType": "Procedure",
"id": "16289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:25.613+02:00",
"source": "#g6oLQKTxnvxzRR0g",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:22.176 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:22.794 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:26.898+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:26.898+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:22.794 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:23.381 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:23.381 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B5uLHaYEaf4EPhlC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16290/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16290/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:23.381 [print] {
"resourceType": "Procedure",
"id": "16290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:28.101+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
> *
print COOKIES
11:34:23.381 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:23.383 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:23.383 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B5uLHaYEaf4EPhlC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16290/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16290/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:23.383 [print] {
"resourceType": "Procedure",
"id": "16290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:28.101+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
> *
print COOKIES
11:34:23.383 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:24.988 [print] {
"resourceType": "Procedure",
"id": "16290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:28.101+02:00",
"source": "#B5uLHaYEaf4EPhlC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:25.792 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:26.360 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:30.510+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:30.510+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:26.361 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:26.980 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:26.980 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eoi5WqNJeeguX8Wv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16291/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16291/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:26.980 [print] {
"resourceType": "Procedure",
"id": "16291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:31.693+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
> *
print COOKIES
11:34:26.980 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:26.981 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:26.981 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eoi5WqNJeeguX8Wv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16291/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16291/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:26.981 [print] {
"resourceType": "Procedure",
"id": "16291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:31.693+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
> *
print COOKIES
11:34:26.981 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:27.667 [print] {
"resourceType": "Procedure",
"id": "16291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:31.693+02:00",
"source": "#eoi5WqNJeeguX8Wv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:28.284 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:28.930 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:33.011+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:33.011+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:28.931 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:29.557 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:29.557 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zvtCAK3N0ZzwGMTf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16292/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16292/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:29.557 [print] {
"resourceType": "Procedure",
"id": "16292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:34.279+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
> *
print COOKIES
11:34:29.557 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:29.558 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:29.558 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zvtCAK3N0ZzwGMTf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16292/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16292/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:29.558 [print] {
"resourceType": "Procedure",
"id": "16292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:34.279+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
> *
print COOKIES
11:34:29.558 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:30.164 [print] {
"resourceType": "Procedure",
"id": "16292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:34.279+02:00",
"source": "#zvtCAK3N0ZzwGMTf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:30.783 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:31.368 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:35.521+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:35.521+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:31.368 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:32.015 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:32.015 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YDRRzA2YfuKDU84Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16293/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16293/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:32.015 [print] {
"resourceType": "Procedure",
"id": "16293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:36.728+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
> *
print COOKIES
11:34:32.015 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:32.015 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:32.015 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YDRRzA2YfuKDU84Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16293/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16293/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:32.015 [print] {
"resourceType": "Procedure",
"id": "16293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:36.728+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
> *
print COOKIES
11:34:32.015 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:33.132 [print] {
"resourceType": "Procedure",
"id": "16293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:36.728+02:00",
"source": "#YDRRzA2YfuKDU84Y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:33.863 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:34.483 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:38.584+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:38.584+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:34.483 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:35.093 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:35.093 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"98rAQRmIqk2rg623"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16294/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16294/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:35.093 [print] {
"resourceType": "Procedure",
"id": "16294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:39.820+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
> *
print COOKIES
11:34:35.093 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:35.095 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:35.095 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"98rAQRmIqk2rg623"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16294/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16294/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:35.095 [print] {
"resourceType": "Procedure",
"id": "16294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:39.820+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
> *
print COOKIES
11:34:35.095 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:35.675 [print] {
"resourceType": "Procedure",
"id": "16294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:39.820+02:00",
"source": "#98rAQRmIqk2rg623",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:36.258 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:36.874 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:40.986+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:40.986+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:36.875 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:37.530 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:37.530 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vZycOGDJuOlIfBL8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16295/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16295/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:37.530 [print] {
"resourceType": "Procedure",
"id": "16295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:42.248+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
> *
print COOKIES
11:34:37.530 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:37.532 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:37.532 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vZycOGDJuOlIfBL8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16295/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16295/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:37.532 [print] {
"resourceType": "Procedure",
"id": "16295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:42.248+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
> *
print COOKIES
11:34:37.532 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:38.121 [print] {
"resourceType": "Procedure",
"id": "16295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:42.248+02:00",
"source": "#vZycOGDJuOlIfBL8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:38.764 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:39.341 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:43.482+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:43.482+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:39.341 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:39.982 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:39.982 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WcMFLK7ropocuAtn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16296/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16296/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:39.982 [print] {
"resourceType": "Procedure",
"id": "16296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:44.705+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
> *
print COOKIES
11:34:39.982 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:39.983 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:39.983 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WcMFLK7ropocuAtn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16296/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16296/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:39.983 [print] {
"resourceType": "Procedure",
"id": "16296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:44.705+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
> *
print COOKIES
11:34:39.983 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:40.601 [print] {
"resourceType": "Procedure",
"id": "16296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:44.705+02:00",
"source": "#WcMFLK7ropocuAtn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:41.211 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:41.852 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:45.938+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:45.938+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:41.853 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:42.440 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:42.440 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SEWzqDQsY2gkUTyY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16297/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16297/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:42.441 [print] {
"resourceType": "Procedure",
"id": "16297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:47.166+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
> *
print COOKIES
11:34:42.441 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:42.442 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:42.442 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SEWzqDQsY2gkUTyY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16297/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16297/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:42.442 [print] {
"resourceType": "Procedure",
"id": "16297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:47.166+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
> *
print COOKIES
11:34:42.442 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:43.067 [print] {
"resourceType": "Procedure",
"id": "16297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:47.166+02:00",
"source": "#SEWzqDQsY2gkUTyY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:43.691 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:44.266 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:48.420+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:48.420+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:44.267 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:44.865 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:44.865 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ENA3GMk6AQLQShXJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16298/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16298/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:44.866 [print] {
"resourceType": "Procedure",
"id": "16298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:49.597+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
> *
print COOKIES
11:34:44.866 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:44.867 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:44.867 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ENA3GMk6AQLQShXJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16298/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16298/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:44.867 [print] {
"resourceType": "Procedure",
"id": "16298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:49.597+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
> *
print COOKIES
11:34:44.867 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:45.521 [print] {
"resourceType": "Procedure",
"id": "16298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:49.597+02:00",
"source": "#ENA3GMk6AQLQShXJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:46.155 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:46.788 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:50.873+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:50.873+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:46.788 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:47.414 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:47.414 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IZLMKWJjjxRgmuRZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16299/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16299/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:47.414 [print] {
"resourceType": "Procedure",
"id": "16299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:52.141+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
> *
print COOKIES
11:34:47.414 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:47.414 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:47.414 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IZLMKWJjjxRgmuRZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16299/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16299/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:47.414 [print] {
"resourceType": "Procedure",
"id": "16299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:52.141+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
> *
print COOKIES
11:34:47.414 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:48.062 [print] {
"resourceType": "Procedure",
"id": "16299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:52.141+02:00",
"source": "#IZLMKWJjjxRgmuRZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:48.657 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:49.260 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:53.386+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:53.386+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:49.260 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:49.972 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:49.972 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bt40PZODn14LKww2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16300/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16300/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:49.972 [print] {
"resourceType": "Procedure",
"id": "16300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:54.703+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
> *
print COOKIES
11:34:49.972 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:49.972 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:49.972 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bt40PZODn14LKww2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16300/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16300/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:49.972 [print] {
"resourceType": "Procedure",
"id": "16300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:54.703+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
> *
print COOKIES
11:34:49.972 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:50.582 [print] {
"resourceType": "Procedure",
"id": "16300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:54.703+02:00",
"source": "#bt40PZODn14LKww2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:51.205 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:54.088 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:34:55.948+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:34:55.948+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:54.088 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:54.680 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:54.680 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B19ExSgkBAaC3ip9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16301/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16301/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:54.680 [print] {
"resourceType": "Procedure",
"id": "16301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:59.414+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
> *
print COOKIES
11:34:54.680 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:54.682 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:54.682 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B19ExSgkBAaC3ip9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16301/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:34:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16301/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:34:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:54.682 [print] {
"resourceType": "Procedure",
"id": "16301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:59.414+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
> *
print COOKIES
11:34:54.682 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:55.278 [print] {
"resourceType": "Procedure",
"id": "16301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:34:59.414+02:00",
"source": "#B19ExSgkBAaC3ip9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:55.911 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:56.554 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:00.647+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:00.647+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:56.554 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:57.187 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:57.187 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DIgYejZTkmVvHhwt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16302/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16302/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:57.187 [print] {
"resourceType": "Procedure",
"id": "16302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:01.925+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
> *
print COOKIES
11:34:57.187 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:57.187 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:57.187 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DIgYejZTkmVvHhwt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16302/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16302/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:57.187 [print] {
"resourceType": "Procedure",
"id": "16302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:01.925+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
> *
print COOKIES
11:34:57.187 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:57.790 [print] {
"resourceType": "Procedure",
"id": "16302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:01.925+02:00",
"source": "#DIgYejZTkmVvHhwt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:58.371 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:59.018 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:03.115+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:03.115+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:59.018 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:59.655 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:59.655 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FWj517jrkmlUElwk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16303/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16303/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:59.655 [print] {
"resourceType": "Procedure",
"id": "16303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:04.389+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
> *
print COOKIES
11:34:59.655 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:59.655 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:59.655 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FWj517jrkmlUElwk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16303/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16303/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:59.655 [print] {
"resourceType": "Procedure",
"id": "16303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:04.389+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
> *
print COOKIES
11:34:59.655 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:00.473 [print] {
"resourceType": "Procedure",
"id": "16303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:04.389+02:00",
"source": "#FWj517jrkmlUElwk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:01.109 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:01.694 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:05.844+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:05.844+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:01.694 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:02.319 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:02.319 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mHI4AfKEMZfVzzLc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16304/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16304/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:02.319 [print] {
"resourceType": "Procedure",
"id": "16304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:07.061+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
> *
print COOKIES
11:35:02.319 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:02.321 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:02.321 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mHI4AfKEMZfVzzLc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16304/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16304/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:02.321 [print] {
"resourceType": "Procedure",
"id": "16304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:07.061+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
> *
print COOKIES
11:35:02.321 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:02.895 [print] {
"resourceType": "Procedure",
"id": "16304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:07.061+02:00",
"source": "#mHI4AfKEMZfVzzLc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:03.515 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:04.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:08.254+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:08.254+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:04.083 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:04.882 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:04.882 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tfRD2iGGenOE9PwG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16305/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16305/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:04.882 [print] {
"resourceType": "Procedure",
"id": "16305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:09.615+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
> *
print COOKIES
11:35:04.882 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:04.884 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:04.884 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tfRD2iGGenOE9PwG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16305/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16305/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:04.884 [print] {
"resourceType": "Procedure",
"id": "16305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:09.615+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
> *
print COOKIES
11:35:04.884 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:05.447 [print] {
"resourceType": "Procedure",
"id": "16305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:09.615+02:00",
"source": "#tfRD2iGGenOE9PwG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:06.032 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:06.661 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:10.775+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:10.775+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:06.661 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:07.263 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:07.263 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UblCrIdlfg1IOhDX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16306/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16306/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:07.263 [print] {
"resourceType": "Procedure",
"id": "16306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:11.997+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
> *
print COOKIES
11:35:07.263 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:07.263 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:07.263 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UblCrIdlfg1IOhDX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16306/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16306/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:07.263 [print] {
"resourceType": "Procedure",
"id": "16306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:11.997+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
> *
print COOKIES
11:35:07.263 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:07.871 [print] {
"resourceType": "Procedure",
"id": "16306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:11.997+02:00",
"source": "#UblCrIdlfg1IOhDX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:08.521 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:09.120 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:13.263+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:13.263+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:09.121 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:09.739 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:09.739 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"H6chK8FumAeXOWpV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16307/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16307/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:09.739 [print] {
"resourceType": "Procedure",
"id": "16307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:14.475+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
> *
print COOKIES
11:35:09.739 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:09.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:09.741 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"H6chK8FumAeXOWpV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16307/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16307/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:09.741 [print] {
"resourceType": "Procedure",
"id": "16307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:14.475+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
> *
print COOKIES
11:35:09.741 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:10.446 [print] {
"resourceType": "Procedure",
"id": "16307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:14.475+02:00",
"source": "#H6chK8FumAeXOWpV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:11.073 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:12.049 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:15.814+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:15.814+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:12.049 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:12.723 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:12.723 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ElVM03qDFs7fLupr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16308/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16308/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:12.723 [print] {
"resourceType": "Procedure",
"id": "16308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:17.459+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
> *
print COOKIES
11:35:12.723 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:12.723 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:12.723 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ElVM03qDFs7fLupr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16308/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16308/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:12.723 [print] {
"resourceType": "Procedure",
"id": "16308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:17.459+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
> *
print COOKIES
11:35:12.723 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:13.377 [print] {
"resourceType": "Procedure",
"id": "16308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:17.459+02:00",
"source": "#ElVM03qDFs7fLupr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:13.982 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:14.612 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:18.725+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:18.725+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:14.612 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:16.480 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:16.480 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CLi7hZqSqgxvLgvy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16309/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16309/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:16.480 [print] {
"resourceType": "Procedure",
"id": "16309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:21.223+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
> *
print COOKIES
11:35:16.480 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:16.482 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:16.482 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CLi7hZqSqgxvLgvy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16309/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16309/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:16.482 [print] {
"resourceType": "Procedure",
"id": "16309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:21.223+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
> *
print COOKIES
11:35:16.482 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:17.081 [print] {
"resourceType": "Procedure",
"id": "16309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:21.223+02:00",
"source": "#CLi7hZqSqgxvLgvy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:17.727 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:18.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:22.476+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:22.476+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:18.317 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:18.945 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:18.945 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GBolTbUWUreCjDyq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16310/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16310/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:18.945 [print] {
"resourceType": "Procedure",
"id": "16310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:23.691+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
> *
print COOKIES
11:35:18.945 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:18.947 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:18.947 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GBolTbUWUreCjDyq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16310/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16310/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:18.947 [print] {
"resourceType": "Procedure",
"id": "16310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:23.691+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
> *
print COOKIES
11:35:18.947 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:19.560 [print] {
"resourceType": "Procedure",
"id": "16310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:23.691+02:00",
"source": "#GBolTbUWUreCjDyq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:20.140 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:20.770 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:24.889+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:24.889+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:20.771 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-01-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:21.394 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:21.394 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1XM24d8MQLJGStaw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16311/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16311/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:21.395 [print] {
"resourceType": "Procedure",
"id": "16311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:26.142+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-01-24"
}
> *
print COOKIES
11:35:21.395 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:21.396 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:21.396 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1XM24d8MQLJGStaw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16311/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16311/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:21.396 [print] {
"resourceType": "Procedure",
"id": "16311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:26.142+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-01-24"
}
> *
print COOKIES
11:35:21.396 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:22.002 [print] {
"resourceType": "Procedure",
"id": "16311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:26.142+02:00",
"source": "#1XM24d8MQLJGStaw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-01-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:22.629 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:23.230 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:27.382+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:27.382+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:23.231 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:23.803 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:23.803 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pOp94P4a1VovkxdE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16312/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16312/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:23.803 [print] {
"resourceType": "Procedure",
"id": "16312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:28.558+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
> *
print COOKIES
11:35:23.803 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:23.803 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:23.803 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pOp94P4a1VovkxdE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16312/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16312/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:23.803 [print] {
"resourceType": "Procedure",
"id": "16312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:28.558+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
> *
print COOKIES
11:35:23.803 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:24.418 [print] {
"resourceType": "Procedure",
"id": "16312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:28.558+02:00",
"source": "#pOp94P4a1VovkxdE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:25.037 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:25.615 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:29.791+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:29.791+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:25.616 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:26.239 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:26.239 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"T0TUk0MjSyuCMNT9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16313/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16313/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:26.239 [print] {
"resourceType": "Procedure",
"id": "16313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:30.992+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
> *
print COOKIES
11:35:26.239 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:26.239 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:26.239 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"T0TUk0MjSyuCMNT9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16313/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16313/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:26.239 [print] {
"resourceType": "Procedure",
"id": "16313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:30.992+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
> *
print COOKIES
11:35:26.239 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:26.823 [print] {
"resourceType": "Procedure",
"id": "16313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:30.992+02:00",
"source": "#T0TUk0MjSyuCMNT9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:27.425 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:28.015 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:32.167+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:32.167+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:28.016 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:28.591 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:28.591 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FxnCzGtYvUasLRfK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16314/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16314/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:28.591 [print] {
"resourceType": "Procedure",
"id": "16314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:33.348+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
> *
print COOKIES
11:35:28.591 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:28.593 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:28.593 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FxnCzGtYvUasLRfK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16314/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16314/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:28.593 [print] {
"resourceType": "Procedure",
"id": "16314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:33.348+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
> *
print COOKIES
11:35:28.593 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:29.172 [print] {
"resourceType": "Procedure",
"id": "16314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:33.348+02:00",
"source": "#FxnCzGtYvUasLRfK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:29.777 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:30.378 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:34.513+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:34.513+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:30.379 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:30.981 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:30.982 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a5VOjlyqGvBhCMY8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16315/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16315/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:30.982 [print] {
"resourceType": "Procedure",
"id": "16315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:35.721+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
> *
print COOKIES
11:35:30.982 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:30.983 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:30.983 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a5VOjlyqGvBhCMY8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16315/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16315/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:30.983 [print] {
"resourceType": "Procedure",
"id": "16315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:35.721+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
> *
print COOKIES
11:35:30.983 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:31.543 [print] {
"resourceType": "Procedure",
"id": "16315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:35.721+02:00",
"source": "#a5VOjlyqGvBhCMY8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:32.191 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:32.850 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:36.945+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:36.945+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:32.850 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:33.498 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:33.498 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Iq26QM6bcOse3yYH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16316/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16316/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:33.498 [print] {
"resourceType": "Procedure",
"id": "16316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:38.265+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
> *
print COOKIES
11:35:33.498 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:33.498 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:33.498 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Iq26QM6bcOse3yYH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16316/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16316/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:33.498 [print] {
"resourceType": "Procedure",
"id": "16316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:38.265+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
> *
print COOKIES
11:35:33.498 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:34.130 [print] {
"resourceType": "Procedure",
"id": "16316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:38.265+02:00",
"source": "#Iq26QM6bcOse3yYH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:34.753 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:37.387 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:39.527+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:39.527+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:37.388 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:37.987 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:37.987 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m1tIxCG1XHpw8Zlp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16317/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16317/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:37.987 [print] {
"resourceType": "Procedure",
"id": "16317",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:42.745+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
> *
print COOKIES
11:35:37.987 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:37.989 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:37.989 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m1tIxCG1XHpw8Zlp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16317/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16317/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:37.989 [print] {
"resourceType": "Procedure",
"id": "16317",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:42.745+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
> *
print COOKIES
11:35:37.989 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:38.596 [print] {
"resourceType": "Procedure",
"id": "16317",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:42.745+02:00",
"source": "#m1tIxCG1XHpw8Zlp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:39.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:40.084 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:43.936+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:43.936+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:40.084 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-13"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:40.794 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:40.794 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QaZPtlWBGLQisHeN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16318/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16318/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:40.794 [print] {
"resourceType": "Procedure",
"id": "16318",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:45.556+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-13"
}
> *
print COOKIES
11:35:40.794 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:40.795 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:40.795 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QaZPtlWBGLQisHeN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16318/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16318/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:40.795 [print] {
"resourceType": "Procedure",
"id": "16318",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:45.556+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-13"
}
> *
print COOKIES
11:35:40.795 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:41.379 [print] {
"resourceType": "Procedure",
"id": "16318",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:45.556+02:00",
"source": "#QaZPtlWBGLQisHeN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-13"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:42.011 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:42.648 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:46.773+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:46.773+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:42.649 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:43.260 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:43.260 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yErwDSAd57DxUGcK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16319/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16319/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:43.260 [print] {
"resourceType": "Procedure",
"id": "16319",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:48.017+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
> *
print COOKIES
11:35:43.260 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:43.261 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:43.261 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yErwDSAd57DxUGcK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16319/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16319/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:43.261 [print] {
"resourceType": "Procedure",
"id": "16319",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:48.017+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
> *
print COOKIES
11:35:43.261 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:43.837 [print] {
"resourceType": "Procedure",
"id": "16319",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:48.017+02:00",
"source": "#yErwDSAd57DxUGcK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:44.463 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:45.037 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:49.226+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:49.226+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:45.038 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:45.615 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:45.616 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Sa4AjNlzxnES3vWn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16320/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16320/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:45.616 [print] {
"resourceType": "Procedure",
"id": "16320",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:50.375+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:35:45.616 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:45.618 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:45.618 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Sa4AjNlzxnES3vWn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16320/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16320/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:45.618 [print] {
"resourceType": "Procedure",
"id": "16320",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:50.375+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:35:45.618 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:46.200 [print] {
"resourceType": "Procedure",
"id": "16320",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:50.375+02:00",
"source": "#Sa4AjNlzxnES3vWn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:46.764 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:47.387 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:51.529+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:51.529+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:47.388 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:47.985 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:47.985 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fb9sqpvxUEhOtqca"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16321/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16321/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:47.985 [print] {
"resourceType": "Procedure",
"id": "16321",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:52.746+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
> *
print COOKIES
11:35:47.985 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:47.987 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:47.987 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fb9sqpvxUEhOtqca"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16321/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16321/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:47.987 [print] {
"resourceType": "Procedure",
"id": "16321",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:52.746+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
> *
print COOKIES
11:35:47.987 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:48.560 [print] {
"resourceType": "Procedure",
"id": "16321",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:52.746+02:00",
"source": "#Fb9sqpvxUEhOtqca",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:49.194 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:49.803 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:53.961+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:53.961+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:49.803 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:50.405 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:50.405 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oJ1F53MRM8O3UzA6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16322/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16322/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:50.405 [print] {
"resourceType": "Procedure",
"id": "16322",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:55.183+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
> *
print COOKIES
11:35:50.405 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:50.405 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:50.405 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oJ1F53MRM8O3UzA6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16322/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16322/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:50.405 [print] {
"resourceType": "Procedure",
"id": "16322",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:55.183+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
> *
print COOKIES
11:35:50.405 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:51.025 [print] {
"resourceType": "Procedure",
"id": "16322",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:55.183+02:00",
"source": "#oJ1F53MRM8O3UzA6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:51.644 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:52.201 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:56.411+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:56.411+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:52.217 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:52.822 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:52.822 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wSXUkTggjlHI786o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16323/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16323/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:52.822 [print] {
"resourceType": "Procedure",
"id": "16323",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:57.589+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
> *
print COOKIES
11:35:52.822 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:52.822 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:52.822 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wSXUkTggjlHI786o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16323/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:35:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16323/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:52.822 [print] {
"resourceType": "Procedure",
"id": "16323",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:57.589+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
> *
print COOKIES
11:35:52.822 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:53.790 [print] {
"resourceType": "Procedure",
"id": "16323",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:35:57.589+02:00",
"source": "#wSXUkTggjlHI786o",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:54.413 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:54.989 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:35:59.177+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:35:59.177+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:54.989 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:55.608 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:55.608 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jU2DvC3kuEYDiplL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16324/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16324/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:55.608 [print] {
"resourceType": "Procedure",
"id": "16324",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:00.378+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
> *
print COOKIES
11:35:55.608 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:55.610 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:55.610 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jU2DvC3kuEYDiplL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16324/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16324/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:35:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:55.610 [print] {
"resourceType": "Procedure",
"id": "16324",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:00.378+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
> *
print COOKIES
11:35:55.610 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:56.216 [print] {
"resourceType": "Procedure",
"id": "16324",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:00.378+02:00",
"source": "#jU2DvC3kuEYDiplL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:56.856 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:57.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:01.614+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:01.614+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:57.468 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:58.066 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:58.066 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HhDRVlwyYAWWdMkn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16325/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16325/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:58.066 [print] {
"resourceType": "Procedure",
"id": "16325",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:02.838+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
> *
print COOKIES
11:35:58.066 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:58.068 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:58.068 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HhDRVlwyYAWWdMkn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16325/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16325/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:58.068 [print] {
"resourceType": "Procedure",
"id": "16325",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:02.838+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
> *
print COOKIES
11:35:58.068 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:58.638 [print] {
"resourceType": "Procedure",
"id": "16325",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:02.838+02:00",
"source": "#HhDRVlwyYAWWdMkn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:59.252 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:59.855 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:04.023+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:04.023+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:59.855 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:00.732 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:00.732 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9LTHA3qxXST28Zne"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16326/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16326/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:00.732 [print] {
"resourceType": "Procedure",
"id": "16326",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:05.497+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
> *
print COOKIES
11:36:00.732 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:00.732 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:00.732 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9LTHA3qxXST28Zne"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16326/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16326/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:00.732 [print] {
"resourceType": "Procedure",
"id": "16326",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:05.497+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
> *
print COOKIES
11:36:00.732 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:01.346 [print] {
"resourceType": "Procedure",
"id": "16326",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:05.497+02:00",
"source": "#9LTHA3qxXST28Zne",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:02.283 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:02.885 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:07.059+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:07.059+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:02.885 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:03.531 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:03.532 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8TDUTKAaRZxgIWJo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16327/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16327/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:03.532 [print] {
"resourceType": "Procedure",
"id": "16327",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:08.299+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
> *
print COOKIES
11:36:03.532 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:03.533 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:03.533 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8TDUTKAaRZxgIWJo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16327/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16327/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:03.533 [print] {
"resourceType": "Procedure",
"id": "16327",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:08.299+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
> *
print COOKIES
11:36:03.533 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:04.099 [print] {
"resourceType": "Procedure",
"id": "16327",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:08.299+02:00",
"source": "#8TDUTKAaRZxgIWJo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:04.666 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:06.284 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:09.447+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:09.447+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:06.285 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:06.913 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:06.913 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WMoc9Q0ByPuhibiZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16328/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16328/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:06.913 [print] {
"resourceType": "Procedure",
"id": "16328",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:11.684+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
> *
print COOKIES
11:36:06.913 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:06.913 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:06.913 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WMoc9Q0ByPuhibiZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16328/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16328/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:06.913 [print] {
"resourceType": "Procedure",
"id": "16328",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:11.684+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
> *
print COOKIES
11:36:06.913 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:07.751 [print] {
"resourceType": "Procedure",
"id": "16328",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:11.684+02:00",
"source": "#WMoc9Q0ByPuhibiZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:08.354 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:08.911 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:13.130+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:13.130+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:08.911 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:09.730 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:09.730 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2g6Wab0O2IvD8kJT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16329/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16329/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:09.730 [print] {
"resourceType": "Procedure",
"id": "16329",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:14.514+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
> *
print COOKIES
11:36:09.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:09.730 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:09.730 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2g6Wab0O2IvD8kJT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16329/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16329/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:09.730 [print] {
"resourceType": "Procedure",
"id": "16329",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:14.514+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
> *
print COOKIES
11:36:09.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:10.330 [print] {
"resourceType": "Procedure",
"id": "16329",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:14.514+02:00",
"source": "#2g6Wab0O2IvD8kJT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:10.947 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:11.527 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:15.735+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:15.735+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:11.528 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2016-05-13"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:12.179 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"556"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:12.179 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mh3MDcbw22gufUCr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16330/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16330/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:12.179 [print] {
"resourceType": "Procedure",
"id": "16330",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:16.944+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2016-05-13"
}
> *
print COOKIES
11:36:12.179 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:12.179 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"556"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:12.179 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mh3MDcbw22gufUCr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16330/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16330/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:12.179 [print] {
"resourceType": "Procedure",
"id": "16330",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:16.944+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2016-05-13"
}
> *
print COOKIES
11:36:12.179 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:12.814 [print] {
"resourceType": "Procedure",
"id": "16330",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:16.944+02:00",
"source": "#mh3MDcbw22gufUCr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2016-05-13"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:13.413 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:14.029 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:18.191+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:18.191+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:14.045 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:14.688 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:14.688 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GEgXuhqnKNz8sG0b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16331/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16331/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:14.688 [print] {
"resourceType": "Procedure",
"id": "16331",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:19.453+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
> *
print COOKIES
11:36:14.688 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:14.688 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:14.688 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GEgXuhqnKNz8sG0b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16331/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16331/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:14.688 [print] {
"resourceType": "Procedure",
"id": "16331",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:19.453+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
> *
print COOKIES
11:36:14.688 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:15.354 [print] {
"resourceType": "Procedure",
"id": "16331",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:19.453+02:00",
"source": "#GEgXuhqnKNz8sG0b",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:15.960 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:16.743 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:20.755+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:20.755+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:16.743 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:17.335 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:17.335 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ECs5eTvOCnUfVJGI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16332/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16332/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:17.335 [print] {
"resourceType": "Procedure",
"id": "16332",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:22.113+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
> *
print COOKIES
11:36:17.335 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:17.336 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:17.336 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ECs5eTvOCnUfVJGI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16332/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16332/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:17.336 [print] {
"resourceType": "Procedure",
"id": "16332",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:22.113+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
> *
print COOKIES
11:36:17.336 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:17.904 [print] {
"resourceType": "Procedure",
"id": "16332",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:22.113+02:00",
"source": "#ECs5eTvOCnUfVJGI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:18.512 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:19.089 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:23.291+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:23.291+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:19.089 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2012-10-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:19.696 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:19.696 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3gsZFAGukQ9AQtr8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16333/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16333/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:19.696 [print] {
"resourceType": "Procedure",
"id": "16333",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:24.473+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2012-10-23"
}
> *
print COOKIES
11:36:19.696 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:19.697 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:19.697 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3gsZFAGukQ9AQtr8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16333/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16333/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:19.697 [print] {
"resourceType": "Procedure",
"id": "16333",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:24.473+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2012-10-23"
}
> *
print COOKIES
11:36:19.697 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:20.290 [print] {
"resourceType": "Procedure",
"id": "16333",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:24.473+02:00",
"source": "#3gsZFAGukQ9AQtr8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2012-10-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:20.925 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:21.559 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:25.715+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:25.715+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:21.559 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:22.143 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:22.143 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pStnKSTA4YupCYHx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16334/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16334/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:22.143 [print] {
"resourceType": "Procedure",
"id": "16334",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:26.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
> *
print COOKIES
11:36:22.143 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:22.143 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:22.143 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pStnKSTA4YupCYHx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16334/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16334/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:22.143 [print] {
"resourceType": "Procedure",
"id": "16334",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:26.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
> *
print COOKIES
11:36:22.143 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:22.790 [print] {
"resourceType": "Procedure",
"id": "16334",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:26.937+02:00",
"source": "#pStnKSTA4YupCYHx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:23.445 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:24.037 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:28.231+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:28.231+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:24.038 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:24.603 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:24.603 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"E9yRZ36qrI8aPiGZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16335/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16335/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:24.603 [print] {
"resourceType": "Procedure",
"id": "16335",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:29.397+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
> *
print COOKIES
11:36:24.603 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:24.603 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:24.603 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"E9yRZ36qrI8aPiGZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16335/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16335/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:24.603 [print] {
"resourceType": "Procedure",
"id": "16335",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:29.397+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
> *
print COOKIES
11:36:24.603 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:25.179 [print] {
"resourceType": "Procedure",
"id": "16335",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:29.397+02:00",
"source": "#E9yRZ36qrI8aPiGZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:25.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:26.418 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:30.583+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:30.583+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:26.418 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:27.040 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:27.040 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CfP12MpSwpnxalUA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16336/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16336/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:27.040 [print] {
"resourceType": "Procedure",
"id": "16336",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:31.837+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
> *
print COOKIES
11:36:27.040 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:27.056 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:27.056 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CfP12MpSwpnxalUA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16336/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16336/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:27.056 [print] {
"resourceType": "Procedure",
"id": "16336",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:31.837+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
> *
print COOKIES
11:36:27.056 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:27.619 [print] {
"resourceType": "Procedure",
"id": "16336",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:31.837+02:00",
"source": "#CfP12MpSwpnxalUA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:28.234 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:28.866 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:33.021+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:33.021+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:28.866 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:29.486 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:29.486 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"M7RRnvxZzJLQ3pfU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16337/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16337/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:29.486 [print] {
"resourceType": "Procedure",
"id": "16337",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:34.268+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
> *
print COOKIES
11:36:29.486 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:29.486 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:29.486 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"M7RRnvxZzJLQ3pfU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16337/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16337/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:29.486 [print] {
"resourceType": "Procedure",
"id": "16337",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:34.268+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
> *
print COOKIES
11:36:29.486 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:30.106 [print] {
"resourceType": "Procedure",
"id": "16337",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:34.268+02:00",
"source": "#M7RRnvxZzJLQ3pfU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:30.748 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:31.356 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:35.538+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:35.538+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:31.356 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:32.068 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:32.068 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TpcEO15hWqX5kFn3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16338/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16338/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:32.068 [print] {
"resourceType": "Procedure",
"id": "16338",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:36.838+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
> *
print COOKIES
11:36:32.068 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:32.068 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:32.068 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TpcEO15hWqX5kFn3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16338/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16338/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:32.068 [print] {
"resourceType": "Procedure",
"id": "16338",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:36.838+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
> *
print COOKIES
11:36:32.068 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:33.021 [print] {
"resourceType": "Procedure",
"id": "16338",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:36.838+02:00",
"source": "#TpcEO15hWqX5kFn3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:33.650 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:34.235 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:38.436+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:38.436+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:34.235 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:34.839 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:34.839 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mcTjvoDkOiexlDlU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16339/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16339/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:34.839 [print] {
"resourceType": "Procedure",
"id": "16339",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:39.632+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
> *
print COOKIES
11:36:34.839 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:34.855 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:34.855 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mcTjvoDkOiexlDlU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16339/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16339/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:34.855 [print] {
"resourceType": "Procedure",
"id": "16339",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:39.632+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
> *
print COOKIES
11:36:34.855 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:35.457 [print] {
"resourceType": "Procedure",
"id": "16339",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:39.632+02:00",
"source": "#mcTjvoDkOiexlDlU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:36.053 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:36.670 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:40.838+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:40.838+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:36.670 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:37.273 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:37.273 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gLF2VJX4oMMkM0dM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16340/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16340/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:37.273 [print] {
"resourceType": "Procedure",
"id": "16340",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:42.067+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
> *
print COOKIES
11:36:37.273 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:37.273 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:37.273 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gLF2VJX4oMMkM0dM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16340/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16340/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:37.273 [print] {
"resourceType": "Procedure",
"id": "16340",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:42.067+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
> *
print COOKIES
11:36:37.273 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:37.935 [print] {
"resourceType": "Procedure",
"id": "16340",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:42.067+02:00",
"source": "#gLF2VJX4oMMkM0dM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:38.599 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:39.201 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:43.374+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:43.374+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:39.201 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:39.808 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:39.808 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jk3CEn6ogH8344vU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16341/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16341/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:39.808 [print] {
"resourceType": "Procedure",
"id": "16341",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:44.595+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
> *
print COOKIES
11:36:39.808 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:39.808 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:39.808 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jk3CEn6ogH8344vU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16341/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16341/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:39.808 [print] {
"resourceType": "Procedure",
"id": "16341",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:44.595+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
> *
print COOKIES
11:36:39.808 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:40.413 [print] {
"resourceType": "Procedure",
"id": "16341",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:44.595+02:00",
"source": "#jk3CEn6ogH8344vU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:41.053 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:41.653 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:45.835+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:45.835+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:41.654 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:42.253 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:42.253 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"epvnInK8HoRPLSqV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16342/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16342/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:42.253 [print] {
"resourceType": "Procedure",
"id": "16342",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:47.039+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
> *
print COOKIES
11:36:42.253 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:42.255 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:42.255 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"epvnInK8HoRPLSqV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16342/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16342/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:42.255 [print] {
"resourceType": "Procedure",
"id": "16342",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:47.039+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
> *
print COOKIES
11:36:42.255 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:42.902 [print] {
"resourceType": "Procedure",
"id": "16342",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:47.039+02:00",
"source": "#epvnInK8HoRPLSqV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:43.510 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:44.087 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:48.291+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:48.291+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:44.087 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:44.688 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:44.688 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g2CUe4AVMcbgAPtt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16343/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16343/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:44.688 [print] {
"resourceType": "Procedure",
"id": "16343",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:49.484+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
> *
print COOKIES
11:36:44.688 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:44.688 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:44.688 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g2CUe4AVMcbgAPtt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16343/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16343/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:44.688 [print] {
"resourceType": "Procedure",
"id": "16343",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:49.484+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
> *
print COOKIES
11:36:44.688 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:45.290 [print] {
"resourceType": "Procedure",
"id": "16343",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:49.484+02:00",
"source": "#g2CUe4AVMcbgAPtt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:45.866 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:46.449 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:50.663+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:50.663+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:46.449 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:47.021 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:47.021 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hihUULvdRwRTimA5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16344/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16344/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:47.021 [print] {
"resourceType": "Procedure",
"id": "16344",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:51.819+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
> *
print COOKIES
11:36:47.021 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:47.037 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:47.037 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hihUULvdRwRTimA5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16344/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16344/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:47.037 [print] {
"resourceType": "Procedure",
"id": "16344",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:51.819+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
> *
print COOKIES
11:36:47.037 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:47.639 [print] {
"resourceType": "Procedure",
"id": "16344",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:51.819+02:00",
"source": "#hihUULvdRwRTimA5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:48.216 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:48.793 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:53.001+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:53.001+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:48.794 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:49.442 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:49.442 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"L2aKAVPV8ecYcE2Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16345/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16345/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:49.442 [print] {
"resourceType": "Procedure",
"id": "16345",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:54.221+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:36:49.442 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:49.443 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:49.443 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"L2aKAVPV8ecYcE2Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16345/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16345/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:49.443 [print] {
"resourceType": "Procedure",
"id": "16345",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:54.221+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:36:49.443 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:50.004 [print] {
"resourceType": "Procedure",
"id": "16345",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:54.221+02:00",
"source": "#L2aKAVPV8ecYcE2Z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:50.575 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:51.145 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:55.370+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:55.370+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:51.145 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:51.730 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:51.730 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bDczTY8tBVoDPR6x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16346/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16346/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:51.730 [print] {
"resourceType": "Procedure",
"id": "16346",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:56.518+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
> *
print COOKIES
11:36:51.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:51.730 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:51.730 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bDczTY8tBVoDPR6x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16346/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16346/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:51.730 [print] {
"resourceType": "Procedure",
"id": "16346",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:56.518+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
> *
print COOKIES
11:36:51.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:52.320 [print] {
"resourceType": "Procedure",
"id": "16346",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:56.518+02:00",
"source": "#bDczTY8tBVoDPR6x",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:52.921 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:53.500 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:36:57.715+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:36:57.715+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:53.500 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:54.117 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:54.117 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Hf6WLZkN4XFspo13"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16347/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16347/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:54.117 [print] {
"resourceType": "Procedure",
"id": "16347",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:58.885+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
> *
print COOKIES
11:36:54.117 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:54.118 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:54.118 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Hf6WLZkN4XFspo13"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16347/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:36:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16347/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:36:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:54.118 [print] {
"resourceType": "Procedure",
"id": "16347",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:58.885+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
> *
print COOKIES
11:36:54.118 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:54.703 [print] {
"resourceType": "Procedure",
"id": "16347",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:36:58.885+02:00",
"source": "#Hf6WLZkN4XFspo13",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:55.321 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:55.971 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:00.115+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:00.115+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:55.973 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:56.847 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:56.847 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bgkCEY8HdCYhf8ia"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16348/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16348/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:56.849 [print] {
"resourceType": "Procedure",
"id": "16348",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:01.619+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
> *
print COOKIES
11:36:56.849 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:56.849 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:56.849 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bgkCEY8HdCYhf8ia"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16348/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16348/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:56.849 [print] {
"resourceType": "Procedure",
"id": "16348",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:01.619+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
> *
print COOKIES
11:36:56.849 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:57.460 [print] {
"resourceType": "Procedure",
"id": "16348",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:01.619+02:00",
"source": "#bgkCEY8HdCYhf8ia",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:59.045 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:59.643 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:03.830+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:03.830+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:59.644 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:00.246 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:00.246 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SusFGT6wc4rZNVF8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16349/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16349/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:00.246 [print] {
"resourceType": "Procedure",
"id": "16349",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:05.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
> *
print COOKIES
11:37:00.246 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:00.247 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:00.247 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SusFGT6wc4rZNVF8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16349/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16349/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:00.247 [print] {
"resourceType": "Procedure",
"id": "16349",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:05.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
> *
print COOKIES
11:37:00.247 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:00.933 [print] {
"resourceType": "Procedure",
"id": "16349",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:05.031+02:00",
"source": "#SusFGT6wc4rZNVF8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:01.573 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:02.182 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:06.354+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:06.354+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:02.183 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:02.784 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:02.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tNk1LLqdOPsy22Cq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16350/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16350/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:02.784 [print] {
"resourceType": "Procedure",
"id": "16350",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:07.569+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
> *
print COOKIES
11:37:02.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:02.785 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:02.785 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tNk1LLqdOPsy22Cq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16350/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16350/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:02.785 [print] {
"resourceType": "Procedure",
"id": "16350",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:07.569+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
> *
print COOKIES
11:37:02.785 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:03.402 [print] {
"resourceType": "Procedure",
"id": "16350",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:07.569+02:00",
"source": "#tNk1LLqdOPsy22Cq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:03.988 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:04.608 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:08.772+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:08.772+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:04.624 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:05.257 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:05.257 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c9lJG2AeDVWQBC5i"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16351/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16351/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:05.257 [print] {
"resourceType": "Procedure",
"id": "16351",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:10.042+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
> *
print COOKIES
11:37:05.257 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:05.257 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:05.257 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c9lJG2AeDVWQBC5i"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16351/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16351/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:05.257 [print] {
"resourceType": "Procedure",
"id": "16351",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:10.042+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
> *
print COOKIES
11:37:05.257 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:05.836 [print] {
"resourceType": "Procedure",
"id": "16351",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:10.042+02:00",
"source": "#c9lJG2AeDVWQBC5i",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:06.489 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:07.089 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:11.280+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:11.280+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:07.089 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:07.725 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:07.725 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3A7G4Yi9UN1iaWlm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16352/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16352/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:07.725 [print] {
"resourceType": "Procedure",
"id": "16352",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:12.507+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
> *
print COOKIES
11:37:07.725 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:07.725 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:07.725 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3A7G4Yi9UN1iaWlm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16352/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16352/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:07.725 [print] {
"resourceType": "Procedure",
"id": "16352",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:12.507+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
> *
print COOKIES
11:37:07.725 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:08.348 [print] {
"resourceType": "Procedure",
"id": "16352",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:12.507+02:00",
"source": "#3A7G4Yi9UN1iaWlm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:08.934 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:09.551 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:13.722+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:13.722+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:09.551 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:10.152 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:10.152 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J8HMO5GbMU6zI4Gh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16353/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16353/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:10.152 [print] {
"resourceType": "Procedure",
"id": "16353",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:14.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
> *
print COOKIES
11:37:10.152 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:10.152 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:10.152 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J8HMO5GbMU6zI4Gh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16353/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16353/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:10.152 [print] {
"resourceType": "Procedure",
"id": "16353",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:14.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
> *
print COOKIES
11:37:10.152 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:10.737 [print] {
"resourceType": "Procedure",
"id": "16353",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:14.937+02:00",
"source": "#J8HMO5GbMU6zI4Gh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:11.386 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:12.161 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:16.171+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:16.171+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:12.162 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:12.801 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:12.801 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Yn0Q8ziHxsxGyC1T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16354/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16354/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:12.801 [print] {
"resourceType": "Procedure",
"id": "16354",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:17.583+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
> *
print COOKIES
11:37:12.801 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:12.802 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:12.802 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Yn0Q8ziHxsxGyC1T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16354/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16354/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:12.803 [print] {
"resourceType": "Procedure",
"id": "16354",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:17.583+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
> *
print COOKIES
11:37:12.803 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:13.407 [print] {
"resourceType": "Procedure",
"id": "16354",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:17.583+02:00",
"source": "#Yn0Q8ziHxsxGyC1T",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:14.062 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:14.626 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:18.854+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:18.854+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:14.626 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:15.197 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:15.197 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TAUBNw5FhUk4yw0E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16355/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16355/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:15.197 [print] {
"resourceType": "Procedure",
"id": "16355",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:19.993+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
> *
print COOKIES
11:37:15.197 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:15.197 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:15.197 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TAUBNw5FhUk4yw0E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16355/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16355/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:15.197 [print] {
"resourceType": "Procedure",
"id": "16355",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:19.993+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
> *
print COOKIES
11:37:15.197 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:15.830 [print] {
"resourceType": "Procedure",
"id": "16355",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:19.993+02:00",
"source": "#TAUBNw5FhUk4yw0E",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:16.431 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:17.018 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:21.226+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:21.226+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:17.018 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:17.603 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:17.603 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Hw5ecDfpw30jqFTz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16356/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16356/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:17.603 [print] {
"resourceType": "Procedure",
"id": "16356",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:22.395+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
> *
print COOKIES
11:37:17.603 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:17.603 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:17.603 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Hw5ecDfpw30jqFTz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16356/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16356/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:17.603 [print] {
"resourceType": "Procedure",
"id": "16356",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:22.395+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
> *
print COOKIES
11:37:17.603 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:18.236 [print] {
"resourceType": "Procedure",
"id": "16356",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:22.395+02:00",
"source": "#Hw5ecDfpw30jqFTz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:18.860 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:19.439 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:23.654+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:23.654+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:19.439 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:20.059 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:20.059 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d3s1bkXyYB684miQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16357/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16357/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:20.059 [print] {
"resourceType": "Procedure",
"id": "16357",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:24.849+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
> *
print COOKIES
11:37:20.059 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:20.065 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:20.065 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d3s1bkXyYB684miQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16357/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16357/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:20.065 [print] {
"resourceType": "Procedure",
"id": "16357",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:24.849+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
> *
print COOKIES
11:37:20.065 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:20.696 [print] {
"resourceType": "Procedure",
"id": "16357",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:24.849+02:00",
"source": "#d3s1bkXyYB684miQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:21.304 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:21.960 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:26.084+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:26.084+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:21.960 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:22.770 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:22.770 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ykqusu9tqgtgUQE7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16358/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16358/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:22.770 [print] {
"resourceType": "Procedure",
"id": "16358",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:27.568+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
> *
print COOKIES
11:37:22.770 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:22.770 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:22.770 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ykqusu9tqgtgUQE7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16358/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16358/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:22.770 [print] {
"resourceType": "Procedure",
"id": "16358",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:27.568+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
> *
print COOKIES
11:37:22.770 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:23.372 [print] {
"resourceType": "Procedure",
"id": "16358",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:27.568+02:00",
"source": "#ykqusu9tqgtgUQE7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:24.032 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:24.655 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:28.813+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:28.813+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:24.655 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:25.292 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:25.292 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UrNF88r68BL7nrMl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16359/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16359/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:25.292 [print] {
"resourceType": "Procedure",
"id": "16359",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:30.067+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
> *
print COOKIES
11:37:25.292 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:25.292 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:25.292 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UrNF88r68BL7nrMl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16359/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16359/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:25.292 [print] {
"resourceType": "Procedure",
"id": "16359",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:30.067+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
> *
print COOKIES
11:37:25.292 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:25.909 [print] {
"resourceType": "Procedure",
"id": "16359",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:30.067+02:00",
"source": "#UrNF88r68BL7nrMl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:26.541 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:27.189 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:31.323+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:31.323+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:27.189 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:27.807 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:27.807 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JfT9hONuxryq3Ty2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16360/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16360/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:27.807 [print] {
"resourceType": "Procedure",
"id": "16360",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:32.580+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
> *
print COOKIES
11:37:27.807 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:27.807 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:27.807 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JfT9hONuxryq3Ty2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16360/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16360/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:27.807 [print] {
"resourceType": "Procedure",
"id": "16360",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:32.580+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
> *
print COOKIES
11:37:27.807 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:28.408 [print] {
"resourceType": "Procedure",
"id": "16360",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:32.580+02:00",
"source": "#JfT9hONuxryq3Ty2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:29.044 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:29.699 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:33.827+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:33.827+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:29.700 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:30.338 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:30.338 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OyRqHFc5ghe3MwFO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16361/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16361/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:30.338 [print] {
"resourceType": "Procedure",
"id": "16361",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:35.115+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
> *
print COOKIES
11:37:30.338 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:30.338 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:30.338 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OyRqHFc5ghe3MwFO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16361/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16361/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:30.338 [print] {
"resourceType": "Procedure",
"id": "16361",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:35.115+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
> *
print COOKIES
11:37:30.338 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:30.947 [print] {
"resourceType": "Procedure",
"id": "16361",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:35.115+02:00",
"source": "#OyRqHFc5ghe3MwFO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:31.566 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:32.233 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:36.354+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:36.354+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:32.234 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:32.861 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:32.861 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZSCZhIgc0zJmG1Xk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16362/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16362/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:32.861 [print] {
"resourceType": "Procedure",
"id": "16362",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:37.638+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
> *
print COOKIES
11:37:32.861 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:32.861 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:32.861 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZSCZhIgc0zJmG1Xk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16362/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16362/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:32.861 [print] {
"resourceType": "Procedure",
"id": "16362",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:37.638+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
> *
print COOKIES
11:37:32.861 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:33.481 [print] {
"resourceType": "Procedure",
"id": "16362",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:37.638+02:00",
"source": "#ZSCZhIgc0zJmG1Xk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:34.071 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:34.622 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:38.861+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:38.861+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:34.622 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:35.474 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:35.474 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Cvnjjxk6wSQdPKq9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16363/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16363/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:35.474 [print] {
"resourceType": "Procedure",
"id": "16363",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:40.267+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
> *
print COOKIES
11:37:35.474 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:35.474 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:35.474 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Cvnjjxk6wSQdPKq9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16363/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16363/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:35.474 [print] {
"resourceType": "Procedure",
"id": "16363",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:40.267+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
> *
print COOKIES
11:37:35.474 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:36.076 [print] {
"resourceType": "Procedure",
"id": "16363",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:40.267+02:00",
"source": "#Cvnjjxk6wSQdPKq9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:36.650 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:37.267 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:41.449+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:41.449+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:37.267 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:37.868 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:37.868 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pAdHmwPZzp5c7k1A"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16364/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16364/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:37.868 [print] {
"resourceType": "Procedure",
"id": "16364",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:42.643+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
> *
print COOKIES
11:37:37.868 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:37.868 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:37.868 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pAdHmwPZzp5c7k1A"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16364/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16364/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:37.868 [print] {
"resourceType": "Procedure",
"id": "16364",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:42.643+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
> *
print COOKIES
11:37:37.868 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:38.484 [print] {
"resourceType": "Procedure",
"id": "16364",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:42.643+02:00",
"source": "#pAdHmwPZzp5c7k1A",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:39.069 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:39.671 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:43.870+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:43.870+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:39.671 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:40.262 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:40.262 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JnVgZXCDT17R8ufY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16365/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16365/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:40.262 [print] {
"resourceType": "Procedure",
"id": "16365",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:45.051+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
> *
print COOKIES
11:37:40.262 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:40.262 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:40.262 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JnVgZXCDT17R8ufY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16365/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16365/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:40.262 [print] {
"resourceType": "Procedure",
"id": "16365",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:45.051+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
> *
print COOKIES
11:37:40.262 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:40.852 [print] {
"resourceType": "Procedure",
"id": "16365",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:45.051+02:00",
"source": "#JnVgZXCDT17R8ufY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:41.484 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:42.085 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:46.269+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:46.269+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:42.085 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:42.708 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:42.708 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ofHdJX62vJ6U3FP3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16366/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16366/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:42.708 [print] {
"resourceType": "Procedure",
"id": "16366",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:47.497+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
> *
print COOKIES
11:37:42.708 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:42.708 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:42.708 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ofHdJX62vJ6U3FP3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16366/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16366/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:42.708 [print] {
"resourceType": "Procedure",
"id": "16366",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:47.497+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
> *
print COOKIES
11:37:42.708 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:43.291 [print] {
"resourceType": "Procedure",
"id": "16366",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:47.497+02:00",
"source": "#ofHdJX62vJ6U3FP3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:43.879 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:44.469 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:48.675+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:48.675+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:44.469 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:45.111 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:45.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yYNNxmWFAu6eyIPG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16367/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16367/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:45.111 [print] {
"resourceType": "Procedure",
"id": "16367",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:49.901+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
> *
print COOKIES
11:37:45.111 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:45.111 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:45.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yYNNxmWFAu6eyIPG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16367/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16367/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:45.111 [print] {
"resourceType": "Procedure",
"id": "16367",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:49.901+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
> *
print COOKIES
11:37:45.111 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:45.685 [print] {
"resourceType": "Procedure",
"id": "16367",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:49.901+02:00",
"source": "#yYNNxmWFAu6eyIPG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:46.285 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:47.102 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:51.086+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:51.086+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:47.102 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:47.719 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:47.719 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9G8HF2UZiTgV6XVq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16368/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16368/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:47.719 [print] {
"resourceType": "Procedure",
"id": "16368",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:52.505+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
> *
print COOKIES
11:37:47.719 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:47.719 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:47.719 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9G8HF2UZiTgV6XVq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16368/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16368/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:47.719 [print] {
"resourceType": "Procedure",
"id": "16368",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:52.505+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
> *
print COOKIES
11:37:47.719 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:48.303 [print] {
"resourceType": "Procedure",
"id": "16368",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:52.505+02:00",
"source": "#9G8HF2UZiTgV6XVq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:48.874 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:49.477 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:53.675+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:53.675+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:49.477 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:50.054 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:50.054 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MThuk2riS18A04J4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16369/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16369/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:50.054 [print] {
"resourceType": "Procedure",
"id": "16369",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:54.839+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
> *
print COOKIES
11:37:50.054 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:50.054 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:50.054 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MThuk2riS18A04J4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16369/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16369/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:50.054 [print] {
"resourceType": "Procedure",
"id": "16369",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:54.839+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
> *
print COOKIES
11:37:50.054 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:50.638 [print] {
"resourceType": "Procedure",
"id": "16369",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:54.839+02:00",
"source": "#MThuk2riS18A04J4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:51.487 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:52.092 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:56.060+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:56.060+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:52.092 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:52.701 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:52.701 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rEYFOnw3xJHI05v9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16370/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16370/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:52.701 [print] {
"resourceType": "Procedure",
"id": "16370",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:57.489+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
> *
print COOKIES
11:37:52.701 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:52.701 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:52.701 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rEYFOnw3xJHI05v9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16370/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:37:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16370/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:37:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:52.701 [print] {
"resourceType": "Procedure",
"id": "16370",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:57.489+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
> *
print COOKIES
11:37:52.701 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:53.271 [print] {
"resourceType": "Procedure",
"id": "16370",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:37:57.489+02:00",
"source": "#rEYFOnw3xJHI05v9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:54.365 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:54.941 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:37:59.157+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:37:59.157+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:54.941 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:55.546 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:55.546 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xIfEmC7CmsgFrvgJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16371/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16371/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:55.546 [print] {
"resourceType": "Procedure",
"id": "16371",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:00.347+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
> *
print COOKIES
11:37:55.546 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:55.546 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:55.546 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xIfEmC7CmsgFrvgJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16371/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16371/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:55.562 [print] {
"resourceType": "Procedure",
"id": "16371",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:00.347+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
> *
print COOKIES
11:37:55.562 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:56.168 [print] {
"resourceType": "Procedure",
"id": "16371",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:00.347+02:00",
"source": "#xIfEmC7CmsgFrvgJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:56.746 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:57.328 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:01.530+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:01.530+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:57.335 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:57.914 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:57.914 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HvhjhL22AEnHl2N2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16372/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16372/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:57.914 [print] {
"resourceType": "Procedure",
"id": "16372",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:02.697+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
> *
print COOKIES
11:37:57.914 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:57.914 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:57.914 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HvhjhL22AEnHl2N2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16372/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16372/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:57.914 [print] {
"resourceType": "Procedure",
"id": "16372",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:02.697+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
> *
print COOKIES
11:37:57.914 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:58.537 [print] {
"resourceType": "Procedure",
"id": "16372",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:02.697+02:00",
"source": "#HvhjhL22AEnHl2N2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:59.101 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:59.717 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:03.901+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:03.901+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:59.717 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:00.293 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:00.293 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cH4iqVJ9s3p2FcrB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16373/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16373/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:00.293 [print] {
"resourceType": "Procedure",
"id": "16373",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:05.077+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:38:00.293 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:00.293 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:00.293 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cH4iqVJ9s3p2FcrB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16373/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16373/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:00.293 [print] {
"resourceType": "Procedure",
"id": "16373",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:05.077+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:38:00.293 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:00.920 [print] {
"resourceType": "Procedure",
"id": "16373",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:05.077+02:00",
"source": "#cH4iqVJ9s3p2FcrB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:01.506 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:02.108 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:06.288+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:06.288+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:02.108 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:02.714 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:02.714 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"76bKhjdan0wnDmTq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16374/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16374/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:02.714 [print] {
"resourceType": "Procedure",
"id": "16374",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:07.513+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
> *
print COOKIES
11:38:02.714 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:02.714 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:02.714 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"76bKhjdan0wnDmTq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16374/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16374/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:02.714 [print] {
"resourceType": "Procedure",
"id": "16374",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:07.513+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
> *
print COOKIES
11:38:02.714 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:03.331 [print] {
"resourceType": "Procedure",
"id": "16374",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:07.513+02:00",
"source": "#76bKhjdan0wnDmTq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:03.962 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:04.582 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:08.760+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:08.760+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:04.582 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:05.348 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:05.348 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SxAuPU7k6Av45kCj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16375/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16375/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:05.348 [print] {
"resourceType": "Procedure",
"id": "16375",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:10.143+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
> *
print COOKIES
11:38:05.348 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:05.364 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:05.364 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SxAuPU7k6Av45kCj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16375/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16375/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:05.364 [print] {
"resourceType": "Procedure",
"id": "16375",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:10.143+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
> *
print COOKIES
11:38:05.364 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:05.971 [print] {
"resourceType": "Procedure",
"id": "16375",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:10.143+02:00",
"source": "#SxAuPU7k6Av45kCj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:06.618 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 19ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 19ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:07.270 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:11.403+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:11.403+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:07.270 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:07.874 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:07.874 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"erWUtdk9Py7gjVtT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16376/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16376/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:07.874 [print] {
"resourceType": "Procedure",
"id": "16376",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:12.663+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
> *
print COOKIES
11:38:07.874 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:07.874 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:07.874 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"erWUtdk9Py7gjVtT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16376/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16376/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:07.874 [print] {
"resourceType": "Procedure",
"id": "16376",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:12.663+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
> *
print COOKIES
11:38:07.874 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:08.448 [print] {
"resourceType": "Procedure",
"id": "16376",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:12.663+02:00",
"source": "#erWUtdk9Py7gjVtT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:09.049 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:09.681 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:13.849+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:13.849+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:09.681 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:10.283 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:10.283 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ykzFPfGCxnsjwm9J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16377/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16377/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:10.283 [print] {
"resourceType": "Procedure",
"id": "16377",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:15.079+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
> *
print COOKIES
11:38:10.283 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:10.283 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:10.283 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ykzFPfGCxnsjwm9J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16377/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16377/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:10.283 [print] {
"resourceType": "Procedure",
"id": "16377",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:15.079+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
> *
print COOKIES
11:38:10.283 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:10.852 [print] {
"resourceType": "Procedure",
"id": "16377",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:15.079+02:00",
"source": "#ykzFPfGCxnsjwm9J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:11.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:12.120 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:16.292+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:16.292+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:12.120 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:12.772 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:12.772 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vJjRQPju9ESpKgqE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16378/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16378/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:12.772 [print] {
"resourceType": "Procedure",
"id": "16378",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:17.558+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
> *
print COOKIES
11:38:12.772 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:12.773 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:12.773 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vJjRQPju9ESpKgqE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16378/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16378/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:12.773 [print] {
"resourceType": "Procedure",
"id": "16378",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:17.558+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
> *
print COOKIES
11:38:12.773 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:13.339 [print] {
"resourceType": "Procedure",
"id": "16378",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:17.558+02:00",
"source": "#vJjRQPju9ESpKgqE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:13.975 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:14.542 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:18.761+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:18.761+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:14.544 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:15.138 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:15.138 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DmQPdeMcCw7dzQw8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16379/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16379/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:15.138 [print] {
"resourceType": "Procedure",
"id": "16379",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:19.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
> *
print COOKIES
11:38:15.138 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:15.138 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:15.138 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DmQPdeMcCw7dzQw8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16379/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16379/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:15.138 [print] {
"resourceType": "Procedure",
"id": "16379",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:19.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
> *
print COOKIES
11:38:15.138 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:15.755 [print] {
"resourceType": "Procedure",
"id": "16379",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:19.930+02:00",
"source": "#DmQPdeMcCw7dzQw8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:16.387 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:16.977 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:21.175+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:21.175+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:16.977 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:17.626 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:17.626 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CcYiF6dRasaJoSL9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16380/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16380/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:17.626 [print] {
"resourceType": "Procedure",
"id": "16380",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:22.406+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:38:17.626 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:17.628 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:17.628 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CcYiF6dRasaJoSL9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16380/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16380/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:17.628 [print] {
"resourceType": "Procedure",
"id": "16380",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:22.406+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:38:17.628 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:18.202 [print] {
"resourceType": "Procedure",
"id": "16380",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:22.406+02:00",
"source": "#CcYiF6dRasaJoSL9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:18.779 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:19.365 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:23.560+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:23.560+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:19.365 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:20.164 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:20.164 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RW7a7pzSNuFHgqYh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16381/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16381/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:20.164 [print] {
"resourceType": "Procedure",
"id": "16381",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:24.951+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
> *
print COOKIES
11:38:20.164 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:20.165 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:20.165 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RW7a7pzSNuFHgqYh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16381/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16381/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:20.165 [print] {
"resourceType": "Procedure",
"id": "16381",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:24.951+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
> *
print COOKIES
11:38:20.165 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:20.778 [print] {
"resourceType": "Procedure",
"id": "16381",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:24.951+02:00",
"source": "#RW7a7pzSNuFHgqYh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:21.392 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:21.989 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:26.178+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:26.178+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:22.005 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:22.606 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:22.606 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"voaLnvkI2T7l2IKc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16382/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16382/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:22.606 [print] {
"resourceType": "Procedure",
"id": "16382",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:27.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
> *
print COOKIES
11:38:22.606 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:22.608 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:22.608 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"voaLnvkI2T7l2IKc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16382/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16382/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:22.608 [print] {
"resourceType": "Procedure",
"id": "16382",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:27.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
> *
print COOKIES
11:38:22.608 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:23.182 [print] {
"resourceType": "Procedure",
"id": "16382",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:27.391+02:00",
"source": "#voaLnvkI2T7l2IKc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:23.821 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:24.453 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:28.594+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:28.594+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:24.453 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:25.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:25.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mAgFcd1CJE8P6wZZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16383/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16383/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:25.069 [print] {
"resourceType": "Procedure",
"id": "16383",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:29.855+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
> *
print COOKIES
11:38:25.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:25.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:25.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mAgFcd1CJE8P6wZZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16383/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16383/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:25.069 [print] {
"resourceType": "Procedure",
"id": "16383",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:29.855+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
> *
print COOKIES
11:38:25.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:25.722 [print] {
"resourceType": "Procedure",
"id": "16383",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:29.855+02:00",
"source": "#mAgFcd1CJE8P6wZZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:26.324 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:26.980 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:31.098+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:31.098+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:26.981 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:27.595 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:27.595 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"66akCozEDGMUns7r"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16384/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16384/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:27.595 [print] {
"resourceType": "Procedure",
"id": "16384",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:32.382+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
> *
print COOKIES
11:38:27.595 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:27.596 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:27.596 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"66akCozEDGMUns7r"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16384/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16384/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:27.596 [print] {
"resourceType": "Procedure",
"id": "16384",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:32.382+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
> *
print COOKIES
11:38:27.596 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:28.179 [print] {
"resourceType": "Procedure",
"id": "16384",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:32.382+02:00",
"source": "#66akCozEDGMUns7r",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:28.829 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:29.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:33.615+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:33.615+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:29.469 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-02-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:30.108 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:30.108 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kVUyDzj0jTXEwbxa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16385/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16385/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:30.108 [print] {
"resourceType": "Procedure",
"id": "16385",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:34.894+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-02-04"
}
> *
print COOKIES
11:38:30.108 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:30.109 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:30.109 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kVUyDzj0jTXEwbxa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16385/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16385/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:30.109 [print] {
"resourceType": "Procedure",
"id": "16385",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:34.894+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-02-04"
}
> *
print COOKIES
11:38:30.109 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:30.921 [print] {
"resourceType": "Procedure",
"id": "16385",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:34.894+02:00",
"source": "#kVUyDzj0jTXEwbxa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-02-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:31.542 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:32.159 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:36.326+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:36.326+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:32.159 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:32.743 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:32.743 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"onvvbryK05Dyxw9B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16386/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16386/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:32.743 [print] {
"resourceType": "Procedure",
"id": "16386",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:37.525+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
> *
print COOKIES
11:38:32.743 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:32.744 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:32.744 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"onvvbryK05Dyxw9B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16386/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16386/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:32.744 [print] {
"resourceType": "Procedure",
"id": "16386",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:37.525+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
> *
print COOKIES
11:38:32.744 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:33.409 [print] {
"resourceType": "Procedure",
"id": "16386",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:37.525+02:00",
"source": "#onvvbryK05Dyxw9B",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:34.045 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:34.648 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:38.821+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:38.821+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:34.649 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:35.278 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:35.278 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aZEWQ55KnfRw9pIL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16387/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16387/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:35.278 [print] {
"resourceType": "Procedure",
"id": "16387",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:40.052+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
> *
print COOKIES
11:38:35.278 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:35.280 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:35.280 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aZEWQ55KnfRw9pIL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16387/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16387/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:35.280 [print] {
"resourceType": "Procedure",
"id": "16387",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:40.052+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
> *
print COOKIES
11:38:35.280 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:35.880 [print] {
"resourceType": "Procedure",
"id": "16387",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:40.052+02:00",
"source": "#aZEWQ55KnfRw9pIL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:36.587 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:37.226 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:41.352+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:41.352+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:37.226 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:37.843 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:37.843 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"15oxQMZpXTW82J7J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16388/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16388/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:37.843 [print] {
"resourceType": "Procedure",
"id": "16388",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:42.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
> *
print COOKIES
11:38:37.843 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:37.843 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:37.843 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"15oxQMZpXTW82J7J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16388/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16388/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:37.843 [print] {
"resourceType": "Procedure",
"id": "16388",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:42.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
> *
print COOKIES
11:38:37.843 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:38.510 [print] {
"resourceType": "Procedure",
"id": "16388",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:42.635+02:00",
"source": "#15oxQMZpXTW82J7J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:39.112 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:39.952 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:43.901+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:43.901+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:39.952 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:40.954 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:40.954 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UZC7CDe93CgMoAET"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16389/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16389/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:40.954 [print] {
"resourceType": "Procedure",
"id": "16389",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:45.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
> *
print COOKIES
11:38:40.954 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:40.954 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:40.954 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UZC7CDe93CgMoAET"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16389/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16389/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:40.954 [print] {
"resourceType": "Procedure",
"id": "16389",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:45.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
> *
print COOKIES
11:38:40.954 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:41.534 [print] {
"resourceType": "Procedure",
"id": "16389",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:45.731+02:00",
"source": "#UZC7CDe93CgMoAET",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:42.141 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:43.006 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:46.940+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:46.940+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:43.006 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:43.594 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:43.594 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YCVD0kGNrwwBdCdh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16390/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16390/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:43.594 [print] {
"resourceType": "Procedure",
"id": "16390",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:48.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
> *
print COOKIES
11:38:43.594 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:43.594 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:43.594 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YCVD0kGNrwwBdCdh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16390/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16390/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:43.594 [print] {
"resourceType": "Procedure",
"id": "16390",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:48.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
> *
print COOKIES
11:38:43.594 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:44.454 [print] {
"resourceType": "Procedure",
"id": "16390",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:48.391+02:00",
"source": "#YCVD0kGNrwwBdCdh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:45.059 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:45.629 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:49.848+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:49.848+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:45.629 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:46.281 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:46.281 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PKm2cEOkJKSuajRx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16391/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16391/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:46.281 [print] {
"resourceType": "Procedure",
"id": "16391",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:51.066+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
> *
print COOKIES
11:38:46.281 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:46.281 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:46.281 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PKm2cEOkJKSuajRx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16391/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16391/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:46.281 [print] {
"resourceType": "Procedure",
"id": "16391",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:51.066+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
> *
print COOKIES
11:38:46.281 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:46.886 [print] {
"resourceType": "Procedure",
"id": "16391",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:51.066+02:00",
"source": "#PKm2cEOkJKSuajRx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:47.488 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:48.089 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:52.271+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:52.271+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:48.089 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:48.722 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:48.722 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MondKmkwyjOFwnpw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16392/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16392/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:48.722 [print] {
"resourceType": "Procedure",
"id": "16392",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:53.501+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-02"
}
> *
print COOKIES
11:38:48.722 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:48.722 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:48.722 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MondKmkwyjOFwnpw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16392/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16392/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:48.722 [print] {
"resourceType": "Procedure",
"id": "16392",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:53.501+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-02"
}
> *
print COOKIES
11:38:48.722 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:49.328 [print] {
"resourceType": "Procedure",
"id": "16392",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:53.501+02:00",
"source": "#MondKmkwyjOFwnpw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:49.971 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:50.576 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:54.764+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:54.764+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:50.592 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:51.197 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:51.197 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"E1s2CmXAkVIWg3VT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16393/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16393/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:51.197 [print] {
"resourceType": "Procedure",
"id": "16393",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:55.978+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:38:51.197 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:51.203 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:51.203 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"E1s2CmXAkVIWg3VT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16393/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16393/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:51.203 [print] {
"resourceType": "Procedure",
"id": "16393",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:55.978+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:38:51.203 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:51.808 [print] {
"resourceType": "Procedure",
"id": "16393",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:55.978+02:00",
"source": "#E1s2CmXAkVIWg3VT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:52.410 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:53.277 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:57.205+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:57.205+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:53.277 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:53.847 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:53.847 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Sk2ljhO7Rm2jS5Pu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16394/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16394/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:53.847 [print] {
"resourceType": "Procedure",
"id": "16394",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:58.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
> *
print COOKIES
11:38:53.847 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:53.847 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:53.847 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Sk2ljhO7Rm2jS5Pu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16394/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:38:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16394/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:38:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:53.847 [print] {
"resourceType": "Procedure",
"id": "16394",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:58.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
> *
print COOKIES
11:38:53.847 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:54.415 [print] {
"resourceType": "Procedure",
"id": "16394",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:38:58.635+02:00",
"source": "#Sk2ljhO7Rm2jS5Pu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:55.026 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:55.648 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:38:59.817+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:38:59.817+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:55.648 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:56.600 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:56.600 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Wz9whRGAvs58uiHK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16395/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16395/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:56.600 [print] {
"resourceType": "Procedure",
"id": "16395",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:01.387+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
> *
print COOKIES
11:38:56.600 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:56.600 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:56.600 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Wz9whRGAvs58uiHK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16395/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16395/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:56.600 [print] {
"resourceType": "Procedure",
"id": "16395",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:01.387+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
> *
print COOKIES
11:38:56.600 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:57.238 [print] {
"resourceType": "Procedure",
"id": "16395",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:01.387+02:00",
"source": "#Wz9whRGAvs58uiHK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:57.917 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:58.534 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:02.702+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:02.702+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:58.534 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:59.120 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:59.120 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tqhlLHNGzqueLKgC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16396/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16396/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:59.120 [print] {
"resourceType": "Procedure",
"id": "16396",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:03.905+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
> *
print COOKIES
11:38:59.120 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:59.120 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:59.120 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tqhlLHNGzqueLKgC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16396/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16396/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:59.120 [print] {
"resourceType": "Procedure",
"id": "16396",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:03.905+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
> *
print COOKIES
11:38:59.120 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:59.721 [print] {
"resourceType": "Procedure",
"id": "16396",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:03.905+02:00",
"source": "#tqhlLHNGzqueLKgC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:00.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:00.980 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:05.109+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:05.109+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:00.980 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:01.597 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:01.597 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"S2jeLSwv32c1nY7q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16397/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16397/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:01.597 [print] {
"resourceType": "Procedure",
"id": "16397",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:06.383+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
> *
print COOKIES
11:39:01.597 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:01.597 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:01.597 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"S2jeLSwv32c1nY7q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16397/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16397/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:01.597 [print] {
"resourceType": "Procedure",
"id": "16397",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:06.383+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
> *
print COOKIES
11:39:01.597 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:02.284 [print] {
"resourceType": "Procedure",
"id": "16397",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:06.383+02:00",
"source": "#S2jeLSwv32c1nY7q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:02.901 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:03.534 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:07.686+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:07.686+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:03.534 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:04.158 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:04.158 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CfyL8bhOAnpev7ry"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16398/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16398/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:04.158 [print] {
"resourceType": "Procedure",
"id": "16398",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:08.950+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
> *
print COOKIES
11:39:04.158 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:04.158 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:04.158 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CfyL8bhOAnpev7ry"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16398/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16398/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:04.158 [print] {
"resourceType": "Procedure",
"id": "16398",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:08.950+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
> *
print COOKIES
11:39:04.158 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:04.790 [print] {
"resourceType": "Procedure",
"id": "16398",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:08.950+02:00",
"source": "#CfyL8bhOAnpev7ry",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:05.396 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:05.971 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:10.184+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:10.184+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:05.971 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:06.808 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:06.808 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uU7cxHzFsNkQfTAY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16399/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16399/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:06.808 [print] {
"resourceType": "Procedure",
"id": "16399",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:11.600+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:39:06.808 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:06.808 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:06.808 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uU7cxHzFsNkQfTAY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16399/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16399/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:06.808 [print] {
"resourceType": "Procedure",
"id": "16399",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:11.600+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:39:06.808 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:07.461 [print] {
"resourceType": "Procedure",
"id": "16399",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:11.600+02:00",
"source": "#uU7cxHzFsNkQfTAY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:08.100 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:08.802 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:12.877+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:12.877+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:08.802 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:09.436 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:09.436 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X3pw09d0hDKArplj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16400/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16400/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:09.436 [print] {
"resourceType": "Procedure",
"id": "16400",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:14.228+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
> *
print COOKIES
11:39:09.436 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:09.436 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:09.436 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X3pw09d0hDKArplj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16400/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16400/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:09.436 [print] {
"resourceType": "Procedure",
"id": "16400",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:14.228+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
> *
print COOKIES
11:39:09.436 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:10.254 [print] {
"resourceType": "Procedure",
"id": "16400",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:14.228+02:00",
"source": "#X3pw09d0hDKArplj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:10.874 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:11.505 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:15.657+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:15.657+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:11.506 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:12.120 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:12.120 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"E2DxGW6LgRpEKGhU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16401/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16401/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:12.120 [print] {
"resourceType": "Procedure",
"id": "16401",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:16.893+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
> *
print COOKIES
11:39:12.120 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:12.121 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:12.121 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"E2DxGW6LgRpEKGhU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16401/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16401/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:12.122 [print] {
"resourceType": "Procedure",
"id": "16401",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:16.893+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
> *
print COOKIES
11:39:12.122 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:12.721 [print] {
"resourceType": "Procedure",
"id": "16401",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:16.893+02:00",
"source": "#E2DxGW6LgRpEKGhU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:13.349 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:13.913 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:18.133+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:18.133+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:13.914 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2015-02-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:14.500 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"556"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:14.500 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"inCtyJcMtlCRYURN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16402/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16402/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:14.500 [print] {
"resourceType": "Procedure",
"id": "16402",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:19.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2015-02-04"
}
> *
print COOKIES
11:39:14.500 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:14.501 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"556"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:14.501 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"inCtyJcMtlCRYURN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16402/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16402/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:14.501 [print] {
"resourceType": "Procedure",
"id": "16402",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:19.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2015-02-04"
}
> *
print COOKIES
11:39:14.501 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:15.119 [print] {
"resourceType": "Procedure",
"id": "16402",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:19.272+02:00",
"source": "#inCtyJcMtlCRYURN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2015-02-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:15.700 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:16.270 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:20.492+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:20.492+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:16.270 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:16.840 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:16.840 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YCFDDdMPfESrPOp7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16403/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16403/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:16.840 [print] {
"resourceType": "Procedure",
"id": "16403",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:21.636+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
> *
print COOKIES
11:39:16.840 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:16.840 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:16.840 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YCFDDdMPfESrPOp7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16403/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16403/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:16.840 [print] {
"resourceType": "Procedure",
"id": "16403",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:21.636+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
> *
print COOKIES
11:39:16.840 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:17.473 [print] {
"resourceType": "Procedure",
"id": "16403",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:21.636+02:00",
"source": "#YCFDDdMPfESrPOp7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:18.079 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:18.712 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:22.865+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:22.865+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:18.712 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:19.337 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:19.337 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IQ8ncGyQS8WqFNnO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16404/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16404/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:19.337 [print] {
"resourceType": "Procedure",
"id": "16404",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:24.120+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
> *
print COOKIES
11:39:19.337 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:19.337 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:19.337 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IQ8ncGyQS8WqFNnO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16404/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16404/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:19.337 [print] {
"resourceType": "Procedure",
"id": "16404",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:24.120+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
> *
print COOKIES
11:39:19.337 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:19.938 [print] {
"resourceType": "Procedure",
"id": "16404",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:24.120+02:00",
"source": "#IQ8ncGyQS8WqFNnO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:20.540 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:21.156 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:25.325+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:25.325+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:21.156 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:21.757 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:21.757 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ANiLrQzvVvA8djZt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16405/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16405/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:21.757 [print] {
"resourceType": "Procedure",
"id": "16405",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:26.548+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
> *
print COOKIES
11:39:21.757 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:21.757 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:21.757 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ANiLrQzvVvA8djZt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16405/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16405/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:21.757 [print] {
"resourceType": "Procedure",
"id": "16405",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:26.548+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
> *
print COOKIES
11:39:21.757 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:22.359 [print] {
"resourceType": "Procedure",
"id": "16405",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:26.548+02:00",
"source": "#ANiLrQzvVvA8djZt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:22.939 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:23.638 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:27.726+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:27.726+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:23.638 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:24.255 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:24.255 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I7VfNUgsVE3xb4zH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16406/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16406/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:24.255 [print] {
"resourceType": "Procedure",
"id": "16406",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:29.041+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
> *
print COOKIES
11:39:24.255 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:24.255 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:24.255 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I7VfNUgsVE3xb4zH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16406/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16406/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:24.255 [print] {
"resourceType": "Procedure",
"id": "16406",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:29.041+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
> *
print COOKIES
11:39:24.255 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:25.193 [print] {
"resourceType": "Procedure",
"id": "16406",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:29.041+02:00",
"source": "#I7VfNUgsVE3xb4zH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:25.844 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:26.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:30.631+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:30.631+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:26.468 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:27.101 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:27.101 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fG9SkSq8qiDfeARq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16407/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16407/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:27.101 [print] {
"resourceType": "Procedure",
"id": "16407",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:31.884+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
> *
print COOKIES
11:39:27.101 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:27.101 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:27.101 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fG9SkSq8qiDfeARq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16407/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16407/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:27.101 [print] {
"resourceType": "Procedure",
"id": "16407",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:31.884+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
> *
print COOKIES
11:39:27.101 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:27.691 [print] {
"resourceType": "Procedure",
"id": "16407",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:31.884+02:00",
"source": "#fG9SkSq8qiDfeARq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:28.329 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:28.947 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:33.111+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:33.111+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:28.947 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:29.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:29.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NqJE6gABnfezfnhu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16408/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16408/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:29.604 [print] {
"resourceType": "Procedure",
"id": "16408",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:34.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:39:29.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:29.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:29.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NqJE6gABnfezfnhu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16408/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16408/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:29.604 [print] {
"resourceType": "Procedure",
"id": "16408",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:34.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:39:29.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:30.240 [print] {
"resourceType": "Procedure",
"id": "16408",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:34.391+02:00",
"source": "#NqJE6gABnfezfnhu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:30.836 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:31.483 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:35.619+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:35.619+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:31.483 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:33.103 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:33.103 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cAd8VWz4VTD9IAFA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16409/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16409/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:33.103 [print] {
"resourceType": "Procedure",
"id": "16409",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:37.888+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
> *
print COOKIES
11:39:33.103 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:33.103 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:33.103 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cAd8VWz4VTD9IAFA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16409/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16409/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:33.103 [print] {
"resourceType": "Procedure",
"id": "16409",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:37.888+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
> *
print COOKIES
11:39:33.103 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:33.720 [print] {
"resourceType": "Procedure",
"id": "16409",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:37.888+02:00",
"source": "#cAd8VWz4VTD9IAFA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:34.345 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:34.930 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:39.130+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:39.130+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:34.930 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:35.590 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:35.590 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qh7LOeVrJGDhvKPX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16410/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16410/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:35.590 [print] {
"resourceType": "Procedure",
"id": "16410",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:40.370+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
> *
print COOKIES
11:39:35.590 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:35.590 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:35.590 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qh7LOeVrJGDhvKPX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16410/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16410/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:35.590 [print] {
"resourceType": "Procedure",
"id": "16410",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:40.370+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
> *
print COOKIES
11:39:35.590 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:36.201 [print] {
"resourceType": "Procedure",
"id": "16410",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:40.370+02:00",
"source": "#qh7LOeVrJGDhvKPX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:37.788 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:38.374 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:42.576+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:42.576+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:38.374 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:39.871 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:39.871 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0uT3W3NLcIU5baGp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16411/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16411/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:39.871 [print] {
"resourceType": "Procedure",
"id": "16411",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:44.651+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
> *
print COOKIES
11:39:39.871 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:39.871 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:39.871 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0uT3W3NLcIU5baGp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16411/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16411/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:39.871 [print] {
"resourceType": "Procedure",
"id": "16411",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:44.651+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
> *
print COOKIES
11:39:39.871 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:40.486 [print] {
"resourceType": "Procedure",
"id": "16411",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:44.651+02:00",
"source": "#0uT3W3NLcIU5baGp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:41.071 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:41.660 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:45.861+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:45.861+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:41.660 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:42.477 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:42.477 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GQIIiW8zrNcDM7rx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16412/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16412/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:42.477 [print] {
"resourceType": "Procedure",
"id": "16412",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:47.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
> *
print COOKIES
11:39:42.477 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:42.477 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:42.477 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GQIIiW8zrNcDM7rx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16412/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16412/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:42.477 [print] {
"resourceType": "Procedure",
"id": "16412",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:47.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
> *
print COOKIES
11:39:42.477 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:43.063 [print] {
"resourceType": "Procedure",
"id": "16412",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:47.272+02:00",
"source": "#GQIIiW8zrNcDM7rx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:43.699 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:44.282 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:48.480+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:48.480+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:39:44.282 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:44.916 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:44.916 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JpsenXjWMnZ37cKg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16413/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16413/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:44.916 [print] {
"resourceType": "Procedure",
"id": "16413",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:49.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
> *
print COOKIES
11:39:44.916 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:39:44.917 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:39:44.917 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JpsenXjWMnZ37cKg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16413/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:39:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/16413/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:39:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:39:44.918 [print] {
"resourceType": "Procedure",
"id": "16413",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:49.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
> *
print COOKIES
11:39:44.918 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:39:45.498 [print] {
"resourceType": "Procedure",
"id": "16413",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:39:49.700+02:00",
"source": "#JpsenXjWMnZ37cKg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:39:46.078 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:39:46.685 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:39:50.860+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:39:50.860+02:00"
}
]
}